Flowers get their fragrances from specialized structures called "glands" located within their petals. These glands produce and release volatile organic compounds known as "essential oils." These oils contain a complex mixture of chemical compounds that contribute to the distinctive scents emitted by flowers.
Also read - What are the most beautiful flowers in the world?