The procedure for making havdala over wine is as follows. It is customary to begin with a series of verses from the Prophets and Writings to serve as good omens and start the week off on a positive note. This is followed by four berakhot – Ha-gafen over the wine, “besamim” over the fragrance (see below), “borei me’orei ha-esh” (“Creator of firelight”) over fire, and finally “ha-mavdil bein kodesh le-ĥol” (“Who distinguishes sacred from profane”).
Two of these berakhot, Ha-gafen and Ha-mavdil, are essential; one who has not recited them has not fulfilled the mitzva of making havdala over wine. The Sages ordained that two additional berakhot are recited: one on a pleasant aroma, and one over fire. The former helps to soothe the soul’s pain upon the departure of the neshama yeteira at the end of Shabbat. The latter was instituted to commemorate the end of the first Shabbat, when God gave Adam the insight to rub two stones together and make a fire. One who does not have a fragrance or candle may make havdala without them. If, later on that night, a fragrance becomes available, he should recite the berakha and smell it. If he sees a candle or fire, he should recite ha-esh. Ideally, of course, one should prepare a fragrance and a candle for havdala so that all four berakhot can be recited in the order instituted by the Sages (SA 297:1; 298:1).
The berakhot proceed from the most physical to the most sublime of the senses. First we recite the berakha over wine. Taste is an extremely physical sense, activated only when food actually touches the mouth. Next we advance to the sense of smell, which requires proximity but not physical contact. The next berakha is over light. The sense of sight is even more subtle, as one can perceive something even at a great distance. Finally, the berakha of Ha-mavdil pertains to the ability to discern, a function of intelligence. The apex of this ability is discernment between the sacred and the profane (Rashbatz quoted in Kaf Ha-ĥayim 296:3).