Before the widespread use of cheap electronics, the mechanism most frequently used to flash the turn signals automatically was a simple bi-metal strip.
A bi-metal strip is (surprise!) a strip of metal made of two kinds of metal pressed together. When they heat up, the two different kinds of metal expand at different rates, so one gets a little bit longer than the other. But since they’re stuck together back to back, the strip bends in the direction of the shorter one.
So to make the turn signals flash, you run the electricity for the turn signal bulb through a bi-metal strip that is bent slightly, so that the free end is touching the contact that the turn signal bulb is connected to.
When you turn on the electricity using the main turn signal switch, the electricity runs through the bi-metal strip to the turn signal bulb, making the bulb light up. But the bi-metal strip also begins to heat up.
When the bi-metal strip heats up enough (they are designed to have this happen in a second or less, usually) the bending action caused by the heat overcomes the bend the strip was formed with, and the free end of the bi-metal strip snaps away from the contact the turn signal bulb is connected to. This stops the electricity from going to the bulb (which then goes out, obviously) and makes an audible clicking sound.
Now that the electricity is no longer flowing, the bi-metal strip starts to cool down. After a second, it is cool enough for the bend it was formed with to once again prevail, and it snaps back to its original position. This makes another clicking sound, allows the electricity to flow through the turn signal bulb (making it light up again), and the cycle starts all over again.
This continues for as long as the main turn signal switch is on.
This was a simple, reliable (and cheap) way to get a bulb to flash with the technology available at the time, and the clicking sound was just a happy by-product.
With today’s cheap technology, it wouldn’t surprise me that flashers are now all electronic, and the click is added deliberately.
Ugly