He shall be unclean for seven days.
If a man actually lies with her so that her menstrual impurity is on him, he shall be unclean seven days, and every bed on which he lies shall be unclean.
Leviticus 15:24 NASB
He and the woman shall be cut off from among their people.
If there is a man who lies with a menstruous woman and uncovers her nakedness, he has laid bare her flow, and she has exposed the flow of her blood; thus both of them shall be cut off from among their people.
Leviticus 20:18 NASB
Intro
Many commentators have expounded their ideas about the above mentioned texts. Particularly scholars have analyzed them thoroughly and without investigating their contributions, for our subject—sorting out a contradiction—it is enough to read the texts above carefully.
Principle of discrimination
The difference between the two texts is that 20:18 has the addition “and uncovers her nakedness, he has laid bare her flow," which is totally absent in 15:24. So indeed in 20:18 we have to do with sexual intercourse in contrast to 15:24.
Leviticus 15:24
The passage of which this verse is a part deals with the subject of menstruation and what the rules are to be followed by a woman and those in her household. In general the place where she lay or sat should not be used by another during the period of menstruation. If this occurred her impurity should make that individual impure (religiously). He or she had to cleanse themselves by washing and remained ritually unclean until the evening.
It reads as if man and wife had to separate their beds, cots or pallets during that period (15:20). Anyway for that time it was certainly an effective rule to guarantee rest and peace for a wife during her period.
Leviticus 20:18
It is definitely clear that a totally different issue is at stake here: prohibition of sexual intercourse in the period of menstruation. Concerning the question: are these texts contradictory the answer must be: No, each text deals with a different matter.
No Bible Contradiction
Additionally
Leviticus 15:24 and Rachel
It seems that Moses—through the Spirit—formulated many rules of conduct that already existed. About Rachel we read: “Now Rachel had taken the household idols and put them in the camel’s saddle, and she sat on them. And Laban felt through all the tent but did not find them” (Genesis 31:34). She had taken small idols of her father and she risked to be killed if they were found. Sitting on the saddle she supposed rightly that Laban would be extremely unlikely to touch it, so as to not become impure. The story doesn’t tell us that maybe her father Laban understood what she was doing and that he decided the life of his daughter Rachel to be of greater value to him than his idols.
Leviticus 20:18 and Jurisdiction
This text is part of a passage in which all sorts of punishments are formulated concerning sexual violations. Most punishments here are to be seen as ultimate judgements from which all sorts of comparable variations could be deduced by judges (Exodus 18:21-22). For capital punishment, all rules for this are presupposed too. (See the article: Capital Punishment in Biblical Times.) Implications of Leviticus 20:18:
1. If a wife is unwilling she is not guilty, just as in the case of rape (Deuteronomy 22:24).
2. She is seen as equal to the man and is not supposed to submit to a/her man in wrong actions outside her will. She should not behave like a victim of the man.
3. Man and wife are warned seriously that there is a mark which should not be overstepped.
4. There would be a case only if one of the two (the aggrieved person) accused the other in front of a judge.
5. In matters of illicit sexual intercourse it was difficult but necessary to present evidence in court. So only in extreme situations could judges come to a final punishment.
6. The existence of this law made very clear to all in Israel how one was expected to behave in matters of marriage.