All espresso machines need to perform two basic functions: heat and pressurise water to brew coffee, and create steam to froth the milk. For best results, there should be plenty of steam pressure and the hot water temperature is accurately controlled.
There are three basic types of espresso machine: the thermoblock, the double boiler, and the heat-exchanger.
Thermoblock machines pass the brewing water through an electrically heated block of metal, which heats the water up to brewing temperature, more or less. They can also produce steam, by heating up the block of metal to a higher temperature. This takes time, and is quite inconvenient. They are also notoriously inconsistent in terms of temperature.
Double boiler machines have two boilers: one just produces steam, whilst the other produces only hot water for brewing coffee. These machines have really good temperature stability, but can take a long time and lots of power to heat up.
Heat exchanger machines have a single steam boiler. The water for brewing coffee is passed through a coil of pipe inside the steam boiler, where the steam heats it up. These machines can produce steam and espresso at the same time. Getting consitent brewing water temperature is possible, but requires a degree of technique and knowledge such as cooling flushes.
The machines also need to pre-heat the group-head, as there is no point having nice hot brewing water, only to pass it through a stone-cold lump of brass! Most machines do this either using an electrical element, or by circulating heating brewing water through passages in the group-head.