Incandescent bulbs for a flashlight work just like the ones you'd use for a lamp in your home. There's a thin filament inside of the bulb. An electrical current runs through the filament, causing it to glow. The inside of the bulb is filled with argon and/or nitrogen, or, in the case of a small bulb, may have a vacuum instead of gas. These bulbs are convenient and easy to find, as they have been in use and production for more than 100 years. However, the filament is prone to breaking when dropped, and will break on its own over time from normal use.
The construction of a xenon bulb is like that of an incandescent bulb, with a thin filament contained within a glass bulb filled with a gas. However, the gas inside of the bulb is xenon rather than argon or nitrogen. Xenon is an inert, nonreactive gas. These bulbs last longer than traditional incandescent bulbs, and the xenon gas not only makes for a brighter light than traditional incandescent bulbs, but the gas keeps the inside of the bulb clean.
Halogen bulbs also work similarly to incandescent bulbs, but have a few important differences. These bulbs are filled with a halogen gas rather than nitrogen or argon. The filament is made of tungsten. The filament degrades, like the one in an incandescent bulb, but the surrounding gas returns the tungsten material back to the filament, which strengthens it and makes it last longer than an incandescent bulb. These bulbs are very bright, but also get very hot and therefore can be somewhat dangerous.
Light-emitting diode, or LED bulbs, are very long-lasting. For flashlights, these bulbs have shorter, softer beams than the other options, which may be problematic because they lack brightness. However, they have no gas inside of the bulb and no filaments that can be damaged by being dropped, and so are a more durable option. They also can last for decades as compared to an average of 1,000 hours for a traditional incandescent bulb, and a battery for an LED bulb lasts 10 times longer than one for an incandescent bulb.