If a photon hits an electron with an energy that is less than the energy required to change the energy level of an electron, what happens to the energy of the photon (is it not absorbed and just pass through as if the electron wasn't there)?
"If a photon hits an electron". If only it were that simple! The electrons (in this case) are bound in atoms (or ions). If the photon has the "right" energy, then the probability of the atom making a transition from one state to another may become appreciable and the transition may occur.
If the photon does not have the "right" energy - and you can think of this in terms of exciting a resonance - then there is almost no probability of the transition occurring (assuming we are talking about either absorption or stimulated emission). In which case, nothing happens and the photon keeps going, with the same energy.
There are other possibilities. The photon may get scattered. This could be an elastic process and no energy is lost (e.g. Rayleigh scattering just changes the photon direction) or an inelastic process (and energy is given to the electron, though usually the photon would need enough energy to completely unbind the electron in the first place), or maybe the photon has the right energy to be absorbed or stimulate a transition in the molecule in which an atom is bound. There are probably other possibilities to that haven't occurred to me yet.