Onion seeds come from the flower of the onion plant. Similar to a tulip, onions sprout flowers from bulbs below ground. The flowers dry and the seeds pull away easily, either by natural forces or during harvesting.
The flower of the onion is white and fluffy, and the seeds inside are small and black. The bulb, though below ground and sprouting the plant, should not be confused with the seed. To produce a bulb large enough to eat, onions need nutritious and nitrogen-rich soil. The onions that are used in cooking are typically harvested before they flower and produce seeds.