The following information is from Wikipedia
Anise, also called aniseed, is a flowering plant in the family Apiaceae native to the eastern Mediterranean region and Southwest Asia. Its flavor has similarities with some other spices, such as star anise, fennel, and licorice.
Anise is sweet and very aromatic, distinguished by its characteristic flavor. The seeds, whole or ground, are used for preparation of tea (alone or in combination with other aromatic herbs), as well as in a wide variety of regional and ethnic confectioneries, including black jelly beans, British aniseed balls, Australian humbugs, New Zealand aniseed wheels, Italian pizzelle, German Pfeffernüsse and Springerle, Austrian Anisbögen, Dutch muisjes, New Mexican bizcochitos, and Peruvian picarones. It is a key ingredient in Mexican atole de anís and champurrado, which is similar to hot chocolate, and it is taken as a digestive after meals in India.
The Ancient Romans often served spiced cakes with aniseed called mustaceoe at the end of feasts as a digestive. This tradition of serving cake at the end of festivities is the basis for the tradition of serving cake at weddings.
The main use of anise in traditional European herbal medicine was for its carminative effect (reducing flatulence), as noted by John Gerard in his Great Herball, an early encyclopedia of herbal medicine:
The seed wasteth and consumeth winde, and is good against belchings and upbraidings of the stomacke, alaieth gripings of the belly, provoketh urine gently, maketh abundance of milke, and stirreth up bodily lust: it staieth the laske (diarrhea), and also the white flux in women.
John Gerard, The Herball, or Generall Historie of Plantes, 1597
Anise has also been used to treat menstrual cramps and colic. The essential oil has reportedly been used as an insecticide against head lice and mites.