An electron can absorb a photon and jump to different energy levels, where these energy levels are analogous to orbits around the nucleus (which I’m sure you know). The electron moves to different energy levels depending on the energy of the photon (defined by E = h•f). If sufficient energy is given to the electron, it can then become free from the atom. The photoelectric effect comes into play and is the net effect of the ionisation of the metal due to electron emission, as a result of the incident photons exceeding the work function of the metal. Both are, at the heart of it, are the same thing. Where the photoelectric effect seems to be the overall effect of electron emission from atoms. If the incident photons don’t result in electron emission from a metal, the electrons in the metal still will move around energy levels, but may not necessarily release photons.I hope this helped, I’m not the best at verbalising things😊Please someone correct me if I’m wrong.