Some ancillary components can be operated without the ignition turned on by turning the switch to the auxiliary position. A radio is usually wired through this switch, so that it can be played with the engine off.
The electrical system of a car is a closed circuit with an independent power source the battery. It operates on a small fraction of the power of a household circuit.
The two components are connected in series so that the varying resistance in the sender will affect the position of the needle on the gauge.
When an electrical component stops working the fault may be in the component, in the electrical circuit or in the fuse that protects them. Because the fuse is a likely cause, and the easiest to check, look at it first.