They contain the same essential oil as the botanically unrelated Spanish anise seed, which gives the two a nearly identical flavour - strong, sweet, and liquorice.
It has a sweetish liquorice taste. The star-shaped fruits are picked just before ripening and dried before use.