The besamim box holds the fragrant spices used in Havdalah, the short ceremony recited at the close of the Sabbath and of major festivals that marks the transition back into ordinary time. Havdalah involves a cup of wine, a braided multi-wick candle, and the spice box in sequence: a blessing over wine, a blessing over the light of the candle, and a blessing over the spices, during which participants open the box and inhale its contents before the box is passed around so each person present can do the same. The spices are most traditionally cloves, though myrtle, cinnamon and various fragrant herbs are also used depending on community custom, and some communities use a fresh myrtle branch, hadas, directly rather than a filled container, a practice that predates the elaborate silver boxes that later became widespread.
The custom's stated purpose in rabbinic sources is consolation: the Sabbath is traditionally held to bring an additional soul, a heightened spiritual capacity, that departs as the Sabbath ends, and the sweetness of the spices is explained in later commentary as compensating the ordinary soul for that loss as the week's mundane demands resume. Havdalah itself is a required rite marking the Sabbath's formal end, and the besamim box, while not itself commanded by name in the earliest sources, became the customary vessel through which the spice blessing came to be performed across nearly all traditional Jewish communities.