The most common cause is idling the engine for long intervals, which does not generate enough heat in the cylinder for a complete burn.
[4] Wet stacking is detectable by the presence of a black ooze around the exhaust manifold, piping and turbocharger, if fitted.
It can be mistaken for lubricating oil in some cases, but it consists of the "heavy ends" of the diesel fuel which do not burn when combustion temperature is too low.
When the engine is first placed under a load after long periods of idling and wet stacking, it may blow some black exhaust out as it burns that excess fuel off.
[4] In order to avoid failures from either type of wetstacking, the conventional advice is that the engine should never be operated for extended periods of time at less than half-load.
In order to assure that the engine operates at a load of at least 50%, artificial loads are sometimes applied... Wetstacking also occurs when solid carbon or nonvolatile liquids accumulate along the cylinder wall or in the piston ring grooves and inhibit expansion and sealing of the ring against the cylinder wall.