We use them every day, but most people don't know how garage door remotes work.
Garage door remotes are actually radio transmitters. Modern garage door motors have radio receivers that operate at 315 MHz. When you click your garage door remote, it sends a signal to the opener. Once the radio receiver on the opener gets the signal from the remote transmitter, it activates a relay that starts the motor running.
When garage door remotes and openers first came out, they were simple radio transmitters and receivers, so any garage door remote could open any garage door. As garage door openers became more popular, this was clearly an issue that had to be resolved.
To fix this, modern garage door remotes transmit a radio signal that has a binary number encoded into it. The remote sends the binary number, and the receiver on the opener looks for that number and only opens if it gets the right number.
Every time that the receiver gets a code, a new one is generated for the next time. The remote transmitter and opener receiver both share the same chip to generate new codes, so they always match up. This prevents would-be thieves from using a radio to listen to the code and using that code to open a garage door that they shouldn't be able to.