What does the Torah mean when it writes that the animals came "l'Mineihu (or l'Minah)"?
Rashi: It means that, only those animals, birds and vermin that had cleaved to their own species came to the Ark.
How did the animals come to the Ark?
Rashi: They came on their own accord, in pairs (guided presumably by the Divine Hand).
Targum Yonasan: They were led by an angel.
QUESTIONS ON RASHI
Rashi writes: "Only those animals that stuck to their own species... [The birds] came of their own accord; [also,] whatever [bird] the Teivah admitted [was known to be innocent]." Why were both safeguards necessary?
Gur Aryeh: Although the birds came of their own accord (as inspired by HaSh-m), other birds might chance to accompany them, and therefore an additional safeguard was necessary - the Teivah would not admit them. The birds must have come of their own accord, because many species of birds live in the wilderness and would not have been accessible to Noach. Furthermore, it would have been an unnecessary hardship for Noach to keep bringing birds at random until the Teivah would admit the required amount. 1
The Gemara (Sanhedrin 108b) brings the two safeguards as differing opinions; see Gur Aryeh as to how Rashi interprets the Gemara.