How do indicator light circuits work?
In the old days the indicator light was just placed parallel to for instance the headlights. That's what made wiring so complicated; I've been told that my previous, 1994 car had for instance more than 1.5km of wiring in it.
Nowadays everything is electronically controlled. The electronic switch which switches your headlights also measures the current and signals the board computer any defects. The board computer will switch on a light on the dashboard when the headlights are on, and another one (or blink that one) when the headlight's lamp is broken. Indicator lights may be replaced by display segments on OLED displays.  

Typically the electronics in a car will communicate via CAN bus (for "Car Area Network", before it was renamed to "Controller Area Network").