The Quran says: give women their marriage portions as a free gift. In some societies, what was paid at a marriage went to the bride's father or male relatives and she herself received nothing. Islam made the gift her own property. She may spend it, save it or give it away as she wishes, and if she gives part of it back to her husband willingly, that is her decision and not his claim.
There is no fixed amount. When a man came to the Prophet Muhammad ﷺ wanting to marry and had almost nothing, the Prophet told him to look for something, even an iron ring, and in the end the Prophet married him to the woman on the basis of the portions of the Quran he knew. Many scholars take this as a sign that mahr can be small and that it should not be a burden that keeps people from marrying.
If a couple divorce after the marriage has been consummated, the husband may not take back what he gave her, however great it was, unless she freely agrees to give something back, and if they divorce before consummation she keeps half of what was agreed. Do not confuse mahr with the dowry that a bride's family pays to the groom in some cultures, especially in South Asia: that custom is not part of Islam, and it often causes real harm to families.