In the quantum mechanical level of the Schrodinger equation the atom has energy levels which the electron is allowed to occupy. Transitions from higher energy levels to lower ones result in the emission of a photon.
One can develop an intuition from the more primitive version of quantization, the Bohr atom, where the electron is constrained by the postulates to be in a quantized energy level. The Bohr atom was postulated because in classical electromagnetic theory described by Maxwell's equations an electron orbiting like a planet around a proton would emit continuously electromagnetic radiation until it fell on the proton. This was not observed. Instead spectra of light were observed , showing that light came chopped up, in quanta of energy. Together with the photoelectric effect the presence of photons, particles of light, with zero mass and energy =h*nu were postulated and found consistently.
The electromagnetic wave of frequency nu is made up of a huge ensemble of such photons. There have been experiments shooting single photons at two slits, where the interference pattern is built up a dot at a time, showing the individual photon particle reaction with the screen and the collective wave nature.
You ask:
This leads to my confusion: if it does not dissappear instantaneously, then the photon still exists and is not absorbed.
E&M Waves(Photons) are not localized, so how can they be absorbed.
Thus your confusion comes because you assign to the photon the complete electromagnetic wave. The single photon absorbed by the atom and raising the electron to a higher energy level is a tiny part of the electromagnetic wave and can behave as a particle transfering its energy and momentum at a time delta(t) compatible with the width of the line that absorbs it. When it behaves as a wave at the micro level of the atoms, it is a probability wave, as the two slit experiment shows. It has a probability of displaying the frequency of the classical wave it belongs to, in its interaction with matter at specific (x,y,z). The ensemble of photons is an energy wave in space, built up by the zillion individual photons.
So in the same sense that a billiard ball hits another and transfers its momentum/energy at a time interval delta(t) the photon behaves the same way and transfers its momentum/energy to the atom when absorbed. It is not the ensemble of photons making up the electromagnetic wave continuously impinging on matter that disappears. Just a tiny quantum of it , localized with a delta(t) and delta(x) delta(y) delta(z).