Onion in the general sense can be used for any plant in the genus Allium but used without qualifiers usually means Allium cepa, also called the garden onion. Onions (usually but not exclusively the bulbs) are edible with a distinctive strong flavour and pungent odour which is mellowed by cooking. They generally have a papery outer skin over a fleshy, layered inner core. Used worldwide for culinary purposes, they come in a wide variety of forms and colors (but generally brown, white or purple).
The common brown onion tends to have a very pungent odour, and it makes the eyes water. Some varieties have more or less of the eye-watering chemicals, which also makes them taste milder. 'Spanish onions' (the large white onions with a purple skin and purple flecks) are much milder than brown onions, making them more suitable for raw use in salads.
Onions may be grown from seed or very commonly from "sets". Onion sets are produced by sowing seed very thickly one year, resulting in stunted plants which produce very small bulbs. These bulbs are very easy to set out and grow into mature bulbs the following year, but they have the reputation of producing a less durable bulb than onions grown directly from seed and thinned.
Either planting method may be used to produce spring onions or green onions, which are just onions harvested while immature, although "green onion" is also a common name for the welsh onion, Allium fistulosum which never produces dry bulbs and the 'Spring onions' used in Asian cooking are an entirely different variety which never grows a full bulb.
Onions may be either served raw or cooked. Cutting onions can be a harrowing experience and often bring tears to the eyes. Folklore says that burning a candle close to the cutting board may decrease the pain.
Red onions have a milder flavor and may be safely added raw to dishes, most typically salads.
White and brown onions are best cooked. Boiling an onion only creates a bitter flavor, unless steps are taken to reverse the bitterness (boiling in salty water may help). Typically, onions are fried, usually in butter or oil in a skillet or frying pan. It's best to fry onions with like vegetables -- garlic, leeks, or scallions. Cooking with acidic vegetables (e.g., tomatoes, tomatillos, or lemons) will disrupt the carmelization process and the onion will never soften. It's best to add acidic vegetables or wine (for deglazing) after the onions are soft.
The genus Allium is a large one, and most of the species are considered to be "onions" in the looser sense. Commonly raised vegetable alliums include the leeks, garlic, elephant garlic, chives, shallots, welsh onions and garlic chives.
The wild onion (allium ursinum) is collected in the wild, its leaves and bulbs used as food.