This is a flowering plant that grows around the Mediterranean. It has a flavor similar to black licorice, and it often used for that specific flavoring. The flavor comes from a compound called anethole, which it shares with fennel.
In my experience, the Greek liquor Ouzo is heavily flavored with anise.