According to most opinions in the Gemara, if a man and a woman are prohibited from marrying one another because they are issurei erva (forbidden because of an incestuous relationship) for which they would be liable to receive a death penalty, then Jewish law will not recognize their marriage, and any children that they may have together will be considered mamzerim. If, however, the prohibition is only a lav – a simple prohibition for which the transgressor is punished by receiving lashes – then halakha will recognize the marriage (of course, the courts will obligate them to divorce), and the children will not be stigmatized as mamzerim.
The case of yevama may be an exception, however.
The Gemara brings the opinion of Rav Yehuda in the name of Rav who teaches that the passage (Devarim 25:5) forbidding a yevama from marrying a man from outside the family should be understood to mean that any attempt on her part to get married will be rejected by the Jewish courts. Shmuel disagrees, and requires her to receive a divorce from her husband.
According to Rav, why should the case of yevama differ from all other such cases in the Torah?
The Maharik explains that yevama is a unique halakha, in which the connection between the widow and the yavam is so strong that it actually allows the couple to marry, even though she is the yavam’s brother’s wife – an issur erva – that ordinarily would make them forbidden to one another, even after the first husband’s death. If the relationship between the yavam and yevama is even stronger than an issur erva, and we know that marriage with an issur erva cannot take place according to the halakha, it is a kal va-homer (an a fortiori inference) to conclude that marriage cannot take place in the face of this relationship.
The Maharik’s argument notwithstanding, both the Rambam (Hilkhot Ishut 4:14) and the Shulhan Aruk (Even ha-Ezer 44:7) rule like Shmuel that she will need a divorce.