It is a mitzva to conclude Shabbat with havdala, in which we give verbal expression to the difference between the sanctity of Shabbat and the ordinary weekdays. The laws pertaining to havdala are similar to those pertaining to kiddush. Just as one must mention the sanctity of Shabbat on Friday night both during prayer and over a cup of wine, so too, at the conclusion of Shabbat one must recite havdala both during prayer and over a cup of wine.
It is true that originally, when the Men of the Great Assembly formulated havdala, they designed it for prayer alone. This was because it was at the time of the building of the Second Temple, and the Jews were poor. Therefore, the Sages did not wish to burden them with an additional expense by requiring wine for havdala. However, later on when the Jews’ financial situation improved and they could afford it, the Sages ordained that havdala be recited over a cup of wine. There was a period of time when people made havdala only on a cup of wine, not during prayer. Eventually it was decided that havdala would be done both during prayer and over a cup of wine. Women, who do not generally pray Ma’ariv, fulfill their obligation by hearing havdala over a cup of wine. Similarly, if one forgot to add the havdala insertion in the Amida, he does not repeat the prayer. Rather, he fulfills the obligation by hearing havdala over a cup of wine (SA 294:1).
The havdala in prayer is recited during the fourth berakha of the Amida since this is the first berakha that relates to everyday matters. Additionally, the theme of this berakha is knowledge, without which one cannot distinguish between the sacred and the profane. Therefore, it is logical to integrate havdala into the berakha in which we request wisdom and knowledge (Berakhot 33a).
According to many poskim, the obligation of havdala is by Torah law. These poskim understand the mitzva of Zakhor to include both kiddush and havdala; that is, marking Shabbat’s onset by invoking its sanctity and its exit by distinguishing the sacred from the profane. The requirement to recite kiddush and havdala over a cup of wine is rabbinic (Rambam). Others maintain that the Torah commandment of Zakhor is limited to invoking the sanctity of Shabbat at its onset, but the Sages expanded the mitzva by ordaining the recitation of havdala at its end (Rosh).
Women are obligated in havdala like men. Even though it is a time-dependent positive mitzva, from which women are generally exempt, since it is linked to the mitzva of kiddush, women are obligated to recite havdala just as they are obligated in kiddush (as explained above in 6:1). Nevertheless, there is an opinion that since havdala is time-dependent, women are exempt from it (Orĥot Ĥayim). In deference to this, le-khatĥila women generally do not make havdala for themselves, but rather hear it from a man. However, if there is no man present, a woman must make havdala for herself, reciting all four berakhot of havdala. Even if there is a man present, if he has already fulfilled his havdala obligation, it is proper that the woman make havdala for herself (MB 296:36). Only if she does not know how to make the berakhot herself can a man who already fulfilled his obligation make havdala for her.