Praise be to Allah.
Intercourse with a menstruating woman is haraam according to scholarly consensus, because Allaah says (interpretation of the meaning):
“They ask you concerning menstruation. Say: that is an Adha (a harmful thing for a husband to have a sexual intercourse with his wife while she is having her menses), therefore, keep away from women during menses and go not unto them till they are purified (from menses and have taken a bath)”
And al-Tirmidhi (135) narrated from Abu Hurayrah (may Allaah be pleased with him) that the Prophet (peace and blessings of Allaah be upon him) said: “Whoever has intercourse with a menstruating woman or with a woman in her back passage, or goes to a soothsayer, has disbelieved in that which was revealed to Muhammad (peace and blessings of Allaah be upon him).” Classed as saheeh by al-Albaani in Saheeh al-Tirmidhi.
The one who does that has to repent and offer expiation, by giving a dinar or half of a dinar to the poor and needy, because of the report narrated by Ahmad (2032), Abu Dawood (264), al-Tirmidhi (135), al-Nasaa’i (289) and Ibn Majaah (640) from Ibn ‘Abbaas (may Allaah be pleased with him), according to which the Prophet (peace and blessings of Allaah be upon him) said concerning one who had intercourse with his wife when she was menstruating: “Let him give a dinar or half a dinar in charity.” Classed as saheeh by al-Albaani in Saheeh Abi Dawood.
A dinar is four and a quarter grams of gold, so he should find out what that is worth and give that amount in charity, or half of it, and he should also resolve not to do this thing again.
If what you mean by having intercourse in Ramadaan is intercourse with a menstruating woman during the night in Ramadaan, then what you must do is what is mentioned above, namely repent and offer expiation.
If what is meant is that you had intercourse during the day in Ramadaan, then you have committed two major sins: breaking the fast in Ramadaan and having intercourse during your wife’s menses.
With regard to intercourse during your wife’s menses, you know what the penalty is.
With regard to breaking the fast during the day in Ramadaan by having intercourse, five things result from that:
2-Spoiling of the fast
3-Obligation to refrain from eating and drinking for the remainder of the day
4-Obligation of making up the spoiled fast
5-Obligation of offering expiation and repenting.
So you have to make up the day on which you spoiled your fast by having intercourse and you also have to offer expiation by freeing a slave. The one who cannot do that has to fast for two consecutive month. If he is unable to do that then he must feed sixty poor persons. See the answer to question no. 22938.
May Allaah help us all to do that which He loves and which pleases Him.
And Allaah knows best.