597. Previous Engagement: The prohibition against a widow remarrying before severing the tie...
…the wife of the deceased may not marry another man… (Deuteronomy 25:5)
If a man dies childless, his brother has an obligation to marry the widow in order to raise children in the deceased's name. This obligation is discussed more fully in the next mitzvah. Before we get there, we have a prohibition for the yevamah (that is, the sister-in-law, i.e., the deceased's widow) to marry or have sexual relations with anyone other than the yavam (the brother-in-law, i.e., the deceased's brother) before the situation is resolved. (The names "yavam" and "yevamah" describe the parties' relationship to one another, not to the deceased.)
The reason for this mitzvah, presumably, is that it impedes the fulfillment of yibum, the marriage between the yavam and the yevamah. Also, since there is a bond between the yavam and the yevamah, another man getting in the way smacks of adultery. (It's not exactly the same. Since the deceased could have more than one brother and more than one wife, any yavam could marry any yevamah; there's not necessarily a one-to-one relationship.)
This mitzvah applies to men - they're not allowed to marry or have sexual relations with the yevamah - but it also applies to the yevamah in that she's not permitted to be with any other man until such time as her bond to the yavam is dissolved. This mitzvah is discussed in the Talmud in tractate Yevamos on page 13a and elsewhere. It is codified in the Shulchan Aruch in Even Ha’Ezer 159. This mitzvah is #357 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos and #135 of the 194 negative mitzvos that can be observed today as listed in the Chofetz Chaim’s Sefer HaMitzvos HaKatzar.