Praise be to Allah.
If a man divorces his wife and this is the first or second talaaq and she has not ended her ‘iddah (by giving birth if she is pregnant or by the passage of three menstrual cycles), then he can take his wife back by saying, “I am taking you back” or “I am keeping you.” Then his taking her back is valid. Or he may do some action intending thereby to take her back, such as having intercourse with the intention of taking her back.
The Sunnah is to have two witnesses to the fact that he has taken her back, so that two witnesses testify to that, because Allaah says (interpretation of the meaning):
“Then when they are about to attain their term appointed, either take them back in a good manner or part with them in a good manner. And take as witness two just persons from among you (Muslims)”[al-Talaaq 65:2]
In this manner a man may take his wife back.
But if the ‘iddah has ended following a first or second talaaq, then there has to be a new marriage contract. In this case he has to propose marriage like any other man, to her guardian and to her. When she and her guardian agree and they agree upon a mahr, then the marriage contract is completed. That must be done in the presence of two just witnesses.
But if the divorce is the final – i.e., third – divorce, then she becomes haraam for him until another man has married her, because Allaah says (interpretation of the meaning):
“And if he has divorced her (the third time), then she is not lawful unto him thereafter until she has married another husband” [al-Baqarah 2:230]
So it is not permissible for him to marry her unless she has been married to another man and the marriage has been consummated, then he leaves her either through death or divorce. This marriage must be a legitimate shar’i marriage; if she marries him just to make it permissible for her to go back to her first husband, that is not permitted and she does not become permissible (to the first husband).