Bicycle lights have been revoloutionised in recent years by the arrival of LEDs, the solid little electronic components that have replaced bulbs. Even when bulbs are still found, they're no longer tungsten (like many household bulbs) but the much more efficient halogen.
Lights come in three main types distinguished by power source.
Modern dynamo lights use a halogen bulb, powered from the riders pedalling effort. There is some rolling resistance when the light is operating, but none otherwise.
Bottle dynamos work by applying a roller to the sidewall of a tyre (either front or rear). Hub dynamos are incorporated into a wheel, usually the front one along with a drum brake. (Older systems were sometimes on the rear wheel, where they were used with rim brakes).
Dynamo front lights are required by law in parts of Europe - but such bicycles usually come with automatic rear-lights, LED type with batteries.
The 2 main parts of dynamo lights are not quick-detach, and the automatic back light is bolted in place as well.
More advanced dynamo systems incorporate rechargeable batteries and continue to operate for a short time when stationary at junctions. Dynamo lights will efficiently illuminate the road surface - but only if you're riding somewhere that is really dark. In practise, they usually do little more than alert others to your presence.
Small battery lights
Most cyclists now use small lights with LEDs, powered by 2 off AA size batteries. Both front and rear may be set to be steady or to flash.
All modern battery lights are technically illegal in the UK, since the law lays down the minimum wattage of the bulbs that should be used. LEDs use only a small fraction of this battery power.
These small lights are easily removed (which means you may want to remove them when parked), but are cheap and fit easily in pockets.
Powerful battery lights
Front lights with more powerful LEDs or bulbs are available, these will illuminate the road and give many hours of light.
Like the small battery lights, they are detachable - so are useful as torches. They will just about fit in a large pocket. Technically they are still illegal in the UK.