As you know, fighter aircraft was born during the First World War. At that time, there was only one option for installing a machine gun - in front of the upper part of the fuselage, directly in front of the pilot, so that he could aim. The main problem that the designers of the first combat aircraft faced was how to avoid bullets hitting the propeller rotating in front of the machine gun barrel.
The solution was soon found. In March 1915, the German aircraft designer Anthony Fokker created a synchronizer and installed it on his Fokker E. I. The principle of the mechanism was as follows.
A cam with a protrusion was installed on the rotating part of the engine. When rotating, he moved the thrust associated with the trigger mechanism of the machine gun. The next shot was fired immediately after the blade passed in front of the machine gun barrel. Thus, two problems were solved at once: a high rate of fire and the safety of the screw were ensured.
You can see how the synchronizer works in this video:
And here is what would have happened in the absence of a synchronizer: