The passage in the Torah that is the source for the mitzva of yibum is found in Sefer Devarim (25:5), which describes how, in the event that a man dies with no children, his widow should not marry an outsider, but rather yevama yavo aleha, u-lekahah lo le-isha, ve-yibmah – the surviving brother should come upon her, and take her as a wife, fulfilling the mitzva of yibum with her.
Our Gemara brings a number of possible derashot – derivations of halakha – from this passage, attempting to learn unique teachings from each clause in the pasuk without using any clause more than once. It should be noted that the Talmud Yerushalmi also derives laws (some the same and some different than ours) from this passage, without concern that the clause has already been used for a different teaching.
Examples of laws that our Gemara derives from this passage include:
that the performance of yibum is the fulfillment of a mitzva
that the sexual act will accomplish yibum, whether or not it was done with intent
that any sexual act, whether “natural” or “unnatural,” will complete the yibum.
Based on the first principle mentioned above, several poskim rule that the yavam (the surviving brother) should make a blessing before performing yibum, since the performance of every mitzva requires a berakha beforehand (see Shulhan Aruk, Even ha-Ezer 166).
In answer to the question of why we need a specific teaching for the idea that any sexual act whether “natural” or “unnatural” will complete the yibum, given the general principle that halakha always treats any act of sexual intercourse as having halakhic significance, the Ramban suggests that we may have thought that yibum should be an exception to that rule. Given that yibum focuses on continuing the name of the brother who had passed away, we may have thought that only a sexual act that potentially could have led to pregnancy would have been significant. Thus we need to be taught that even in the case of yibum any sexual act will suffice to fulfill the mitzva.