The Prophet (SAW) did this in a number of ways, including the following:
Drawing an individual’s attention to his mistake so that he could put it right himself.
An example of this is the report narrated by Abu Sa‘eed al- Khudri, who said that he was with the Messenger of Allah, and the Prophet entered and saw a man sitting in the middle of ‘he mosque, clasping his fingers together and talking to
himself. The Prophet (SAW) gestured towards him, but he did not notice. So he turned to Abu Sa'eed and said,
‘If one of you is praying, he should not clasp his fingers together, because this clasping comes from the Shaytan, and you are in a state of prayer so long as you are in the mosque, until you go out.’”
— Asking the person to do something again correctly, if this is possible.
Abu Hurayrah (RA) reported that a man entered the mosque whilst the Messenger of Allah was sitting in a far comer. He prayed, then he came and greeted him with salam. The Messenger of Allah said,
“wa 'alaykas-salam, go back and pray, because you have not prayed.” So he went back and prayed, then he came back and greeted the Prophet, who said, “Wa ‘alaykas-salarn, go back and pray, because you have not prayed (correctly).” On the second occasion, or subsequently, the man said, “Teach me, O’ Messenger of Allah.” He said, “When you stand up to pray, do wudoo ’ properly, then face the Qiblah aud say Takbeer (Alla.hu Akbar']. Then recite whatever is easy for you of the Qur’an, then bow until you are at ease in rukoo ‘ (bowing), then stand up until your back is completely straight. Then prostrate until you are at ease in sujood. (prostration), then sit up until you are at ease in your sitting, then
prostrate again until you are at ease in your sujood, then sit up again until you are at ease in your sitting.
Do this in all your prayers.”
We should note that the Prophet (SAW) used to pay attention to the actions of the people around him so that he could teach them. According to a report narrated by an-Nasa’i:
“A man entered the mosque and prayed, whilst the Messenger of Allah was watching him. When he finished, he turned and greeted the Messenger of Allah, who told him, ‘Go back and pray, for you have not prayed (correctly)’...”
Among the qualities of the educator is that he should be aware of the actions of those who are with him,
— It is a part of educational wisdom to ask a person who has made a mistake to re-do his action, so that he can notice his mistake and put it right himself, especially when it is an obvious mistake that does not befit him. He may have done it out of forgetfulness, so this will remind him.
— If the person who has made a mistake does not realize it, it must be pointed out and explained to him.
— Giving information to a person who is interested and has asked about it himself is more effective and is more likely to be remembered than handing it out to someone who has not made any such inquiries.
The methods of teaching are many, and the educator can choose whichever are best suited in any given circumstances.
Another example of asking a person to repeat his action correctly is given by Muslim in his Saheeh, where he reports that Jabir said: ““Umar ibn al-Khattab told me that,
‘A man did wudoo but missed an area on his foot in the size of a fingernail. The Prophet saw him and said, 'Go back and do your wudoo’ properly.’ So he went and did it again, then he prayed.’”
A third example was narrated by at-Tirmidhi in his Sunan from Kildah ibn Kanbal, who said that Safwan ibn Umayyah sent him with some milk, yoghurt and daghabees (cucumbers) to the Prophet, when the Prophet was at the top of the valley. He said,
“I went near him, and I did not greet him with salam or ask permission to enter, so the Prophet said, "Go out and say, ‘as-salamu ‘alaykum,’ may 1 enter?’ ”'
— Asking the person who has made the mistake to correct it as much as he can.
Bukhari reported from Ibn 'Abbas that the Prophet said,
“No man should be alone with a woman unless he is a mahram (close blood relative to whom marriage is permanently forbidden).” A man stood up and said,
‘O’ Messenger of Allah, my wife has gone out for
Hajj and I have signed up for such-and-such a military campaign.’ He said, ‘Go back and do Hajj with your wife.’ ”
— Putting right the consequences of the mistake.
An-Nasa’i reported in his Sunan from ‘Abdullah ibn ‘Amr that a man came to the Prophet (SAW) and said,
“I have come to pledge allegiance to you and to make hijrah (migration). I have left my parents weeping.”
He said, “Go back to them and make them smile as you made them weep.”
Offering kaffarah (expiation) for the mistake.
If some mistakes cannot be corrected or reversed, then there are other ways offered by Islam for wiping out their effects. One of these ways is kaffarat or acts of expiation, of which there are many types, such as kaffarat al-yameen (expiation for swearing an unfulfilled oath), and expiation for dhihar (a jahili form of divorce in which one says to his wife “You are to me as my mother’s back”), and expiation for manslaughter, having intercourse during the day in Ramadan, and so on.