If one or more levels are partially or completely empty where electrons of the outer shell can move around and free electrons are present, the solid is said to be a conductor. This solid is said to be a semiconductor. Any electrons near the top of this band can be thought of as free electrons or the good candidates. The Fermi energy level is the highest energy level the electrons will occupy without any excitation. Any thermal excitation above 0 Kelvin and the electrons will exist above the Fermi energy level according to Fermi statistics.
Dotted line represents Fermi electrons.
Obviously, the smaller the work function of the solid, the more likely electron emission will occur. Inside the potential well, the electron sees a wall in front of it. The larger the work function the higher the wall making it more difficult to overcome. This is why solids with low work functions are chosen for electron emitters. The thermionic and photoelectric emissions occur when the electron passes over the potential barrier.