There are three main methods:

Strip the engine and hand-clean it
This is effective but very costly, so it is seldom carried out for performance recovery only, but usually coincides with a shop visit for routine maintenance. Thus it is carried out so infrequently that a long deterioration of performance is inevitable between cleans.

Abrasive blasting
The engine is run whilst crushed walnut shells, peach stones, coke or similar material is fed into the air inlet. During its passage through the compressor the abrasive material removes contaminants by “shot blasting.” Unfortunately, it can also erode blade protective coatings (which are becoming increasingly common), damage machined surfaces and undesirably enter bleed valves or other components, and for these reasons it is prohibited on many engines. This is really a last resort for performance recovery of a very badly fouled engine rather than a maintenance tool. There is also evidence that any performance recovery achieved can disappear very quickly after the clean

Regular washing
This is the best answer. Performance is regularly restored in a simple and quick operation which maintains power at optimum levels without abrasion or hand-cleaning.

Washing may be carried out with the engine running (here referred to as “hot washing,” also known as fired or on-line washing), or whilst the engine is being turned on the starter motor (“cold washing,” also known as crank-soak or off-line washing). Each method has advantages in certain operational conditions.