In the RotK movie, Gandalf and Merry light up the beacons of Gondor. These beacons have been built atop each peak of the White Mountains. Mysteriously, when one beacon is lit another also becomes lit as if by magic.
What's the underlying technology here? How do these beacons work?