How does an alternating current flow through a capacitor?

No current flows through the capacitor. With constant switching of the polarity of the voltage across the capacitor with a frequency of 50 Hz. it will constantly recharge and the current in the circuit will change direction 50 times per second.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.