…and the nakedness of your mother you shall not uncover (Leviticus 18:7)
The same verse that prohibits a man from engaging in sexual contact with his father also prohibits it with his mother (and, conversely, a woman with her son).
In Moreh HaNevuchim (Guide for the Perplexed) 3:49, the Rambam explains the need for an overt prohibition on incestuous relations. People feel very close to their family members, and their family members are always around. Therefore, the danger of stumbling in sexual matters is in a way greater with family than with other people. To counter this, the Torah imposes a restriction greater than the fact that the parties involved don’t happen to be married to one another. The Rambam doesn’t say as much, but we are all familiar with the Oedipus complex – “a boy’s best friend is his mother” and all that.
The Ramban (Nachmanides) wrote in his commentary on the Torah (Leviticus 18:6) that the prohibition on incest was tied into the “secrets of pregnancy.” This may refer to the fact that children of closely-related parents are more likely to have genetic defects and congenital disorders.
Still another aspect is that a person is obligated to treat his mother with respect and deference. To put it simply: incest ain’t it.
This law applies regardless of the circumstances of one’s birth. Even if his mother wasn’t married to his father, even if she was a prostitute or the victim of a sexual assault or any other scenario you can imagine, a person’s mother is his mother and there are no exclusions to this prohibition. If she is his father’s wife, however, the act violates two prohibitions, this one and the next one (see Mitzvah #191).
Grandmothers, great-grandmothers, etc. are called shniyos, a secondary level of prohibition. The Torah does not overtly prohibit such relations but it hints at them. In any event, they are prohibited; the Talmud in Yevamos (21a) discusses whether the prohibition is of Biblical or rabbinic origin.
This mitzvah applies to everyone in all times and places. In the Talmud, it is discussed in the tractates of Sanhedrin (54a) and Yevamos (21a-22a). It is codified in the Shulchan Aruch in Even Ha’Ezer 15. It is #330 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos and #112 of the 194 negative mitzvos that can be fulfilled today as listed in the Chofetz Chaim’s Sefer HaMitzvos HaKatzar.