I'm a bit confused about the difference between these two concepts. According to Wikipedia the Fermi energy and Fermi level are closely related concepts. From my understanding, the Fermi energy is the highest occupied energy level of a system in absolute zero? Is that correct? Then what's the difference between Fermi energy and Fermi level?
Fermi Energy – Understanding the Difference Between Fermi Energy and Fermi Level
chemical-potentialdefinitionelectronic-band-theoryenergyfermi-energy
Related Solutions
The reason for this apparent contradiction is that you have two "separate" quantum effects.
Fermi-Dirac distribution describes the energies of single particles in a system comprising many identical particles that obey the Pauli exclusion principle. Distribution is calculated for potential-free space and is temperature dependant.
You put electrons into the material, and in the material they feel potential of atomic cores. This potential restrict possible energetic states that are available for electrons, that is it makes bands, where electrons can behave almost freely (according to Fermi-Dirac distribution), but makes energetic states between the bands forbidden.
The difference between Fermi energy and Fermi level is described in a previously asked question. To summarize, you're correct that the Fermi level is the energy at which (in a 0K system) all of the lower energy states are occupied while all of the higher energy states are unoccupied. For a system not at 0K, the Fermi energy is the energy state that has a 50% likelihood of occupation. With nonzero temperature we may only talk about the probability distribution of electrons in energy levels. The likelyhood of an electron to be in an energy state $\mathcal{E}$ is $f(\mathcal{E})$, where $f$ is the Fermi function.
The work function is defined as the energy necessary to remove an electron from the surface of a metal: $W = -e\phi - E_F$. Here, $e\phi$ is the energy of the electron just outside of the surface of the metal ($\phi$ is the electric potential just outside the surface) and $E_F$ is the Fermi energy. Recall that there are electrons with energies higher than $E_F$ and there are electrons with lower energy than $E_F$-- for these electrons it is easier (harder) to remove them from the metal. By only taking $E_F$ into account the work function is effectively averaging over all possible energy states weighted by the probability of the state being occupied. Getting to your first question, the equation $W = |FE + FL|$ does not make sense to me, because in many systems the Fermi level and energies are similar if not identical, I don't see what adding them would accomplish and why this would yield the work function. Also, the work function is very heavily dependent on the surface properties of the metal, which are taken into account via the potential $\phi$ just outside the surface. I don't see how surface properties are taken into account in the equation your TA wrote.
Now, because for non-0K systems you can only talk about the probability of an energy level being occupied, your band diagram is a bit oversimplified for our discussion. See instead the band diagram in the "Fermi Function" section here. This band diagram is that of a semiconductor, which you can tell because the band gap is small enough for the Fermi function (read: probability of energy state occupation) to be nonzero in the conduction band. However, the point at which the probability of occupation is 50% (read: the Fermi energy) is the same as the Fermi level for all temperatures. Notice how the Fermi function stretches out with increasing temperature, causing an increase in likelihood of electrons occupying the semiconducting band -- this is the picture of a semiconductor that I carry in my head (and also clearly explains why heat increases conductivity).
Another minor correction to your picture is that the energy of an electron just outside of the surface of the metal is not necessarily zero (it's $e\phi$), the work function is the energy difference between being just outside of the metal and being at the Fermi level, and is not the difference between being infinitely far away (0 energy) and being at the Fermi level.
Best Answer
If you consider a typical metal the highest energy band (i.e. the conduction band) is partially filled. The conduction band is effectively continuous, so thermal energy can excite electrons within this band leaving holes lower in the band.
At absolute zero there is no thermal energy, so electrons fill the band starting from the bottom and there is a sharp cutoff at the highest occupied energy level. This energy defines the Fermi energy.
At finite temperatures there is no sharply defined most energetic electron because thermal energy is continuously exciting electrons within the band. The best you can do is define the energy level with a 50% probability of occupation, and this is the Fermi level.