Allah, Exalted be His praise, says: "And do not approach them until they become pure. Then when they have purified themselves, come to them from where Allah has commanded you." [Surah al-Baqarah: 222]
And Imam al-Shafi'i (may Allah have mercy on him) said: "It has been said, and Allah knows best, that (yathurna means) they become pure from menstruation, and when they have purified themselves with water."
Sayyiduna Ibn Abbas (may Allah be pleased with them both) said regarding the saying of Allah Almighty, "So keep away from women during menstruation" [Surah al-Baqarah: 222]: Keep away from intercourse with their private parts. And regarding "And do not approach them until they become pure" [Surah al-Baqarah: 222], he said: When they have become pure from the blood and have thoroughly purified themselves with water. Then regarding "Then come to them from where Allah has commanded you" [Surah al-Baqarah: 222], he said: In the private part, and do not go beyond it to anything else; whoever does anything (other than that) has transgressed the limit.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحيض / 1481