If an electron needs a certain amount of energy to move from state $a$ to state $b$ in an atom, one would hit it with a photon with a frequency that corresponds to this energy and the atom would absorb it, causing the electron to jump up in an energy level and then go back down and emit a photon.
But how does an atom interact with a photon that is off resonance? Is there absolutely no interaction? Can the atom weakly interact with the photon and still scatter it in another direction??