While electrical technicians always use special components when repairing or installing electrical system, it's possible to make an electrical circuit with paper clips and other common items right at home.
Let's try a hands on experiment to get you thinking about how electrical circuits work!
You will need:
Your final layout should look like this –
The circuit you have created can be classed as a DC circuit – it is a closed path with the electrical current only flowing in one direction.
A DC track circuit along a railway works much the same way, and can be broken down into the same components.
A battery or solar panel will supply the power; cables in the tracks deliver the power through to the relay on the other end, and back through to the power source via the other rail in a complete circuit.
When the circuit is complete, the relay is energised and keeps the signals in a 'clear' position. If the circuit breaks, for example through a broken rail or failed power source, then the relay is de-energised and defaults to reporting the block of track as occupied – meaning that the system always fails in a safe way.
Trains are detected because their metal wheels and axles conduct the circuit as a short cut that bypasses the relay altogether. That is, trains short the circuit and de-energise the relay.
And as we've already established, a de-energised relay = an occupied track.