Very simplified discussion.
Here I deal just with electrons. Similar discussion is valid for holes
The band diagram shows the energy values an electron can assume. You have the forbidden band, the conduction band (first band empty or not completely filled), and the valence band (last band entirely filled by electrons). We call the difference between the bottom of the conduction band and the top of the valence band "energy gap".
Traps, and trapping.
Defects of any kind will introduce new energy levels. If these energy levels are in the energy gap, they will act like traps. In fact, an electron in the conduction band that comes in the proximity (it's called "cross section") of that trap, will probably get captured by that energy level as it has a lower energy (the energy difference will be likely lost by phonon emission: lattice vibration, i.e. heat).
How long will an electron stay there? It depends on the trap depth (not only though). The shallower the trap, the higher the chance that an electron can gain enough energy (e.g. due to phonon adsorption) to come out of that trap. An electron can also come out by quantum tunneling.
Why insulators (and semiconductors too) have traps:
Insulators and semiconductors may have traps. These are induced by grain to grain boundaries (in polycrystalline materials), lattice imperfections, unsaturated/broken bonds, impurities, etc.
It means when a contact (or another material) injects electrons/holes to a semiconductor (or even an insulator, as it occurs in floating gate cells). An electron can be injected into a material only if its energy is larger than the minimum energy it can assume on that material. This does not mean that if the conduction band of the "source material" is lower than the conduction band of the "destination" material, injection cannot occur. Thermoionic emission aids injection. Tunneling aids injection. And carriers can become "hot" i.e. they can gain a lot of energy, so their energy will be larger than the conduction energy of the destination material. Hot electron injection is used in NOR flash memories, to inject electrons into the floating gate (through the oxide).
Barrier height for injection:
It is the difference of the "destination material" conduction band level and the "source material" conduction band level. The higher the barrier height, the larger the energy difference, i.e. the less likely that injection will occur.