"If brothers live together and one dies without a child, the wife may
not marry another man. Rather, her brother-in-law should marry her... If
the man doesn't want to marry his sister-in-law, she should go to the
gate, to the elders, and say, "My brother-in-law refuses to establish a
name for his brother in Israel..." (Devarim 25:5, 7)
If a man dies without children, there is a mtizvah for his brother to
marry the widow and thus perpetuate his name. If this is not practical,
the brother participates in chalitzah, a shoe removal ceremony, instead.
Nowadays, only chalitzah is performed because we are unable to have the
pure intentions required for yibum (Yevamos 39a).
The widow may not marry anyone else before she does the chalitzah ceremony.
The oldest brother is the first choice for performing the mitzvah.