How it works
An incandescent light bulb produces light by passing electric current through a thin tungsten filament. The filament acts as a resistor, and as current flows, the resistance causes it to heat up to thousands of degrees until it glows white-hot (incandescence).
Because the filament is essentially a piece of wire, it works equally well on both DC and AC power, and has no polarity (it can be wired in either direction). However, it is highly inefficient compared to LEDs, converting most of its electrical energy into heat rather than light.
Interestingly, the resistance of a cold filament is much lower than when it is hot. This causes a massive "inrush current" when the bulb is first turned on, which quickly drops as the filament heats up and its resistance increases.