Yichud, being in privacy, being in seclusion with a woman, is prohibited for a man on a de'oraita (from Torah law) level if we're talking about a man being together with an erva, being with a relationship that's problematic on an erva level. That is de'oraita. Hachamim (the Sages) expanded this prohibition. They said that Yichud, being in isolation with a woman who is prohibited to him on any level, any type of woman, a Jew or a non-Jew, where relations are forbidden between them, is also forbidden.
We'll now talk about some laws of Yichud. The Mishnah says, “lo yityached adam im shtei nashim.” A man's not allowed to be in seclusion with two women. He has the ability to seduce them, to convince them to perform an aveirah (sin) with him. And if both of them are doing that aveirah, they'll cover it up for each other. They'll make sure that nobody knows about it. They'll be in cahoots together. We're concerned that the man is going to convince both of them to sin and therefore they're both going to not reveal what happened. If one of them performed an aveirah, the other would reveal it about her, but since they're both doing the sin, they'll both be quiet about it. So therefore, we prohibit one man from being in seclusion with two women, but a woman is allowed to be alone in a room with two men because men are usually more ashamed. They won't be with her in front of another man. They're going to be fearful of that sin because other people will know. So therefore, the woman is allowed to be in a room with two men.
Rabbi Shimon says there are instances where one man is allowed to be together in seclusion with two women, which is if his wife is there, if his wife is around, his wife is in the house over there. Her presence is going to hold him back from making an aveirah with another woman, so therefore we allow that one man to be together with two other women, and he's even allowed to sleep in a room with another woman if his wife is there guarding him, ensuring that no sin is going to happen between him and the woman. Why? Like the Mishnah says, because his wife is guarding him from making that aveirah. Her being together around with him is going to hold him back from sin.
“mit'yached adam im imo ve'im bito v'yashen imahen bekiruv basar.” A man is allowed to be in seclusion with his mother or with his daughter. The chiddush (new point) is that even though they're erva, even though he's prohibited to his mother and to his daughter as an erva relationship, of course there's no desire for a man to be with his own family member, so he's allowed to be in Yichud with them, and he's even allowed to sleep next to them where their skin is touching in the same bed, sleeping together in the same bed. There's no concern that they're going to eventually sin, but once the—we're talking about people who have grown up. The boy turns 13 or the girl is 12. When the girl is sleeping in the same bed as her father, she should wear her clothes, and the man—the father—should also sleep in his clothes. A father is not allowed to share his bed with his grown daughter unless both of them have clothes on. A mother, likewise, would not be allowed to share a bed with her own son unless they both have clothes on as well. There's a basic level of tzniut that they should have when they're with each other, when they're both adults and there's an embarrassment to nudity, so therefore they should both be clothed when they would be sleeping in the same bed.

