If a man rapes a virgin maiden, he must marry her (if she so desires). He also pays a fine of fifty silver shekels, which goes to the girl’s father because, in this scenario, the girl is a minor.
The reason for this mitzvah is so that men should not treat women lightly. They are not to be used, abused and thrown away. If he mistreats a woman in such a vile fashion, he might find himself chained to her for life, responsible for her food and clothing, unable to divorce her, and saddled with a heavy fine besides. This should hopefully make a potential rapist think twice before committing such a reprehensible act.
Of course, in our society, we must wonder why a woman would want to marry a man who did such a thing to her. To understand this, we must recognize that not every time and place is like ours. In many points in history – and in some places even today – a woman who was not a virgin, even through no fault of her own, was considered “damaged goods” and might have trouble ever finding a husband. The woman in our scenario was under no obligation to marry the rapist against her will but if she desired it, he was unable to refuse as a consequence of abusing her.
The fine is only in effect when there is a Temple and judges are empowered to impose such penalties. The obligation to marry the girl, however, applies in all times and places. This mitzvah is discussed in the Talmud in tractate Kesubos on pages 39a-40b. It is codified in the Mishneh Torah in the first chapter of Hilchos Naarah Besulah. This mitzvah is #218 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos; it is not listed in the Sefer HaMitzvos HaKatzar of the Chofetz Chaim.