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.

A typical vehicle horn system comes with a steel diaphragm, a contractor and an electromagnet.
ok I think
I think An air horn is a pneumatic device designed to create an extremely loudnoise for signalling purposes. It usually consists of a source which producescompressed air, which passes into ahorn through a reed or diaphragm. The stream of air causes the reed or diaphragm to vibrate, creating sound waves, and the horn amplifies the sound so it is louder. Air horns are widely employed as vehicle horns,
installed on large semi-trailer trucks, fire trucks,trains, and some ambulances as a warning device, and on ships as a signalling device.
yaa this answer can be taken instead I agree