What happens to an electron when a photon hits it?

It absorbs energy and generally moves to a higher energy level.