BSD
The three levels of forbidden marriages in Halacha:
1) Marriage with an “Ervah” – a person whom having relations with carries the Karres punishment. This applies to close relatives (incest). Such marriage is invalid, and children born out of such relations are rendered mamzerim.
2) Marriage forbidden by Torah law that does not carry a Karres punishment. E.g. marriage with a mamzer, marriage of a Kohen and a divorcee. This marriage is valid, bedieved (although the couple should divorce ASAP). According to Rabbi Akiva such marriage is also invalid (with some exceptions).
3) Marriage forbidden indirectly through a positive commandment (Isurey Asseh). E.g. marriage with an Egyptian Ger. Such marriage is valid, bedieved, and the children are not mamzerim.