How were bullets fired through the propeller in the Focke Wulf 190?
Note: See Peter Kämpf's answer for specifically how the Fw 190 Achieved this Electronically
This answer is specific to how this was achieved via mechanical means in earlier aircraft and not specific to the Fw 190.
It's called a &quot;Synchronization Gear&quot; and it allows the gun to fire only when the blade is not in front of the barrel.

Source: Kaiserliches Patentampt (Imperial German patent Office) / Franz Schneider - Patentschrift No. 276396, 1913 First published in Flugsport&quot; (1914) and in many places since, Public Domain,

[From Wikipedia] Interestingly, the linkage between the propeller and the gun is achieved with a spinning drive shaft rather than a reciprocating rod. The impulses needed to operate the trigger, or in this case to prevent the trigger from operating, were produced by a cam wheel with two lobes at 180° apart situated at the gun itself, since the gun is interrupted by both blades of the propeller.

These have been around since before 1920, long before the aircraft you mention in your original post.
The one on the Fokker (not Focke-Wulff, but still German) differs a little bit from the patent image above:

Source: By Gsl - Version with English text of Image:Interrupter_gear_diagram.png, Public Domain
But not significantly, the basic idea is that the trigger mechanism follows a cam lobe which is tied to the propeller shaft. When the cam lobe spins, the trigger is allowed to fire the gun only when the propeller isn't &quot;in the way&quot;.
See Wikipedia Article on the Synchronization Gear for more information.