According to the Sahih Hadith in which our beloved Prophet said, it’s mentioned in
Sahih Bukhari Vol. no. 3, in the book of Fasting, Hadith no. 1936
Where a man comes to the Prophet and he says that
“I am ruined, O Prophet I am ruined”
The Prophet said “What is the matter?”
“The man says I had sex with my wife while I was fasting.”
So the Prophet says that
“Can you free a slave?”
So the man says “No, I cannot”
Then the Prophet asked “Can you fast consecutively for 2 months?” Can you fast continuously for 60 days?”
The man says, “No, I cannot”
Then the Prophet says that “Can you feed 60 poor people?”
And the man says “NO” and the Hadith continues.
In short we come to know from this Hadith that if any person does a sexual intercourse, it is one of the major sins, it is the most serious and sinful amongst all the things that break the fast. The person who does this sin, he should immediately repent to Allah (swt) and ask for forgiveness. He should complete his fast for that day and make up for that fast later on after Ramadhaan and he has to pay penalty and the penalty we come to know from the Hadith is that he either frees a slave if he can,
If he does not have the money to free the slave or he cannot find a slave to free then he should fast for 2 consecutive months, fast for 60 days.
If he cannot do that also then he should at least feed 60 poor people and these are the 3 options that have been given for a person to pay as a penalty, as a Kaffaara but if a person can do the first thing he should not jump to the second or the third.
The first is freeing a slave, if he cannot do that, if he doesn’t have the money or cannot find a slave then you can go to the next option i.e. fasting consecutively for 60 days, if he cannot do that, if he is unable to do that continuously fasting for 60 days, if he fasts for a few days and then one day he doesn’t fast, he should start again. He should fast consecutively for 60 days, if he doesn’t have the capacity to do that then what he can do is he can feed 60 poor people and each poor person should be fed with approximately half Sa’a, each Sa’a is equal to 3 hands full of outstretched hand of wheat. So half Sa’a person or the food that is there of the land so 60 poor people you should feed. This is the Kaffaara, the penalty for a person who breaks a fast by having a sexual intercourse.
(Source - Dr Zakir Naik)