It is given in Surah Baqarah:
Divorce is (revocable) two times (only). Then either retain (the wife) with honour (in marital relationship) or release her with kindness. And it is not lawful for you to take back anything of that which you have given them, unless both fear that (now by maintaining marital ties) they may not be able to observe the limits set by Allah. So if you fear that both will be unable to keep within Allah’s limits, then (in that case) there shall be no sin upon either of them if the wife (herself) may give up something as recompense to free herself (from this distressing bond). These are the limits (set) by Allah. So, do not exceed them. And those who exceed the limits prescribed by Allah, it is they who are the wrongdoers.
Then if he divorces (for the third time), she will not be lawful for him until she marries some husband other than him. But if he (the latter) also divorces her, in such case there shall be no sin on both of them (the former husband and the wife) if they return (once more to the wedlock), provided both of them (now) think that they would be able to observe the limits set by Allah. These are the limits (prescribed) by Allah which He explains to those who have knowledge.
And when you divorce the women and they reach (the completion of) their waiting period, then either retain them (in marital bond) in a graceful manner or release them nicely. But do not retain them to hurt so that you subject (them) to excesses. And he who does so wrongs his own soul. And do not make fun of Allah’s Commands. And call to mind Allah’s favour that has been (bestowed) upon you and the Book that He has sent down to you and (the pearls of) wisdom (on which He has enlightened you). He advises you (by means of this code of conduct). And fear Allah and bear in mind that Allah is indeed All-Knowing.
And when you divorce the women and they reach (the completion of) their waiting period, then do not prevent them from remarrying (their former or latter) husbands when they have mutually agreed according to the Islamic Law. This is a direction for him among you who believes in Allah and the Last Day. It is most pure, clean and wholesome for you. And Allah knows and you do not know (so many things). Surah Baqarah (2:229-232)
The summary of these verses is that in verse 229 of the Holy Quran, Allah Ta'ala says about Talaq Raja'i (The revocable divorce) that after the first and second Talaq, the husband may reconcile with the wife within the Iddat and should fulfill her rights as given. The husband may also let the time period pass and separate from her amiably. After the Iddat, there can be no reconciliation. However, if both of them agree on this, they can marry again.
In the same verse the rules of Khula (annulment of marriage) have been given. The husband cannot take back the Mehr (alimony) and other jewelry given to the wife at the time of divorce. However, if there is a situation that the husband does not want to give divorce and the differences between the couple are such that they cannot live together anymore and the wife is ready to give some money to get her freedom, then in this case, the husband may accept money to divorce her. This is called as Khula annulment of marriage).
In verse number 230, Allah Ta'ala says about Talaq Mughalliza (the final divorce) that after this the husband and wife will be separated. After this, there can be no reconciliation. If after this, they want to marry, then there is only one solution. After the Iddat, the lady should marry somebody else, the marriage should be consummated. Then the husband should divorce the wife out of his own free wish. Then again, the lady should spend the Iddat and only then can she marry the previous husband.
In verse 231, the rules of Talaq Raja'i are further explained. The husband can reconcile with the wife only if his intention (Niyyah) is clear, he intends to fulfill all the rights of the wife. If on the other hand, his intention is to trouble or oppress the lady, then reconciliation becomes impermissible.
In verse 232, if the husband does not reconcile with the wife after the first or second divorce and after this the husband and wife want to marry again, then you should not stop them from doing so, neither should you force them otherwise nor should you be angry at this.