Espresso machines have tanks that are usually hidden from sight and that can build up scale from hard water. One could avoid this issue by using only distilled water, but distilled water does not produce coffee that tastes as good as harder water.
See my blog entry on water for more on this issue.
Now assuming you are using water that does produce scale as most people do the scale can damage the machine and make it work less well or possibly not at all, so it is crucial to treat the machine for scale periodically.
The way to do this depends on the machine you are using. A lever machine like a Pavoni, for example, is easy to descale since you can just open the boiler, pour in water mixed with descaler, let it do its work and then pour it out and flush the machine out. Double boiler machines are trickier. I will try to post links to professional write ups for how to do this for all of the main styles of machines below rather than write a blog that goes on forever.
The key is just to be aware of how hard your water is and thus how often this will have to be done and then to find out how it should be done for your machine.
A cheap TDS meter will allow you to test how hard your water is or you can buy little strips that can be used one time.
Descaling a lever or single boiler machine you fill the boiler with descaler and let it sit for a while and then flush it out. Flush well with fresh water several times.
For an HX machine you may flush both parts, the HX and the steam boiler. The HX must be filled with descaler and flushed, which is fairly easy, but the steam boiler is harder if your machine does not have a drain for the boiler as rinsing it out takes much longer.
Most vendors have more detailed write ups on their websites and most will say this is one of the most important tasks you can perform to keep your machine in good shape.
By the way, you do not need to buy expensive descalering products. It suffices to use citric acid although again ask your vendor before doing treating your machine with any chemicals (and for that matter before you go too long without treating it).