Electric horns use the principles of electromagnetism to operate. A typical vehicle horn system comes with a steel diaphragm, a contractor and an electromagnet.
Pressing down on the horn triggers the electromagnet, which in turn causes the diaphragm to move. When the diaphragm has reached its maximum point, the contractor turns off the current momentarily, allowing the diaphragm to return to its original position. The current is then restored and the process repeated in a continuous cycle. The rapid back and forth movement of the diaphragm is what results in the sound.
Electric horns come in different frequency notes and with different noise levels. Most modern cars have a single note, however many of the cars made before the 1970s came with two horns, a low-note horn and high-one, which allowed for distinct sounds. The use of two horns is also the reason behind the classic "beep-beep" sound of some classic cars, such as the Beetle. Larger diaphragms allow for larger and deeper sounds. This is why trucks, SUVs and other heavy vehicles typically feature deeper horns than smaller vehicles. Many trucks also come with air powered horns for even fuller results. Auto manufacturers invest a lot of money trying to find the ideal sound that best represents the feel of different car models.