It is a quantum mechanical process. One could go on an explanation with photon creation and annihilation operators , but there is not much intuition into that.
One can start classically, an accelerating charge radiates an electromagnetic wave. The Bohr atom was proposed, i.e. the quantization of energy levels, in order to explain why a circulating electron would not radiate its energy away and fall into the nucleus. What the Bohr model does, instead of the electron radiating continuously, it can only radiate in quanta of electromagnetic energy , when falling into an empty energy level. Otherwise it is in a stable orbit ( Bohr model has orbits). This quantum of electromagnetic energy is called a photon. It is a quantum mechanical entity, sometimes appearing as a particle and sometimes when in large numbers building up the classical electromagnetic wave.
In the Schrodinger equation solution of the hydrogen atom the same logic holds, except the electron is in an orbital and not an orbit.