Such thermo-electric cooler consists of multiple semiconductor elements which are connected in series as shown in the figure below. The doping density in the semiconductor elements is graded with the highest density at the high temperature end and the low density at the low temperature end. An electrical current is applied to the series connection of these elements. n-type and p-type elements are used to ensure that the carriers flow in the same direction. While in principle a single piece of semiconducting material could have been used, the series connection is typically chosen to avoid the high current requirement of the single element.

The operation of the thermo electric cooler is similar to that of a Joule-Thomson refrigerator in that an expansion of a gas is used to cool it down. While heating of a gas can be obtained by compressing it as is the case in a bicycle pump (where some of the heating is due to friction), a gas can also be cooled by expanding it into a larger volume. This process is most efficient if no heat is exchanged with the environment as it would increase the lowest obtainable temperature. This is also refered to as an isentropic expansion as the entropy is constant if no heat is exchanged.
The gas in a thermo-electric cooler is the electron or hole gas. As a constant current is applied so that carriers flow from the high density to low density region, one can imagine that the volume around a fixed number of carriers must increase as the carriers move towards the lower doped region. A possible energy band diagram is shown below:

At constant temperature and in thermal equilibrium there is no current as the diffusion current is balanced by the drift current associated with the built-in electric field caused by the graded doping density. As a current is applied to the semiconductor the built-in field is reduced so that the carriers diffuse from the high to low doping density. This causes a temperature reduction on the low doped side which continues until the entropy is constant throughout the semiconductor. Since the entropy per electron equals the distance between the conduction band edge and the Fermi energy plus 5/2 kT one finds that the conduction band edge is almost parallel to the Fermi energy.
An ideal isentropic expansion is not obtained due to the Joule heating caused by the applied current and the thermal losses due to the thermal conductivity of the material. The need to remove heat at the low temperature futher increases the lowest achievable temperature.