In the video and pictures below, this guy is trying to replicate Hertz's experiment to generate electromagnetic fields from a dipole antenna. How did a spark generate electromagnetic fields? I thought it is the capacitors that generated the electromagnetic fields.
EM waves are generated by accelerating charges. The transmitter is a circuit that supports an oscillating current (which requires that the charges are accelerating during the oscillations). The spark is part of that circuit, but is not the cause of the transmissions.
The capacitors increase the amount of charge that can be placed into the circuit before it discharges. The transmitter in the video has the foil pieces acting as capacitors.
The spark gap is acting as a switch. If the antenna were directly connected, it would be very difficult to place much charge on it. By having a gap, when the antenna begins charging, more charge can be delivered into the capacitance of the antenna. Then when the voltage is high enough, the spark forms and allows the current to flow, which oscillates in the antenna until drained.
The first primitive radio transmitters were spark gaps. They generate radio waves from high voltage sparks between two conductors. The high energy excites electrons to higher energy levels where photons are emitted in all directions. All electrons emit photons when they're accelerated or moved in any way, especially when there energized in a spark gap.
Electromagnetic fields are caused by the movement of charged particles. Modern devices use conductive antennas of a size matching a desired wavelength to emit controlled, band-limited signals of moderate power.
Although an electrical current propagates at the speed of light, the individual carriers in a conductor (electrons) move quite slowly, and we witness the bulk effect of the movement through the conductor. In a spark gap, however, the electrons are separated from their conductive environment and forced to travel through air or space. Without the conduction band of conducting material, they accelerate somewhat freely from one electrode to another, gaining considerable velocity and creating a relatively powerful electromagnetic field.
This field is inherently modified by the volume of charge required to maintain the arc. The capacitors are quickly exhausted, depriving the arc of its sustaining power, and the arc stops momentarily as the capacitors charge. This is a chaotic process and results in the generated field having a considerable bandwidth in addition to its high strength. The fields thus generated are detectable with minimal technology, unlike modern radio signals which are detected only by devices bandwidth-limited and purpose-built (unless you're driving past a high power AM transmitter, in which case your fillings may suffice).
Although the spark-gap transmitter has its place in radio history, particularly Marconi's famous transatlantic message, it is clear that only one transmitter can effectively operate within its range. Spectrum management has addressed this issue.