Ajahn Dhammasiha uses the simile of a sewage treatment plant to describe the process of mental purification through meditation. First the water has to be slowed down, to allow the lighter particles to float to the surface, and the heavier particles to sink to the ground. Then they are skimmed off from the surface, and taken away from the bottom.
Similar, in meditation the mind first has to be slowed down through the practice of samatha/samadhi/calm. Then we contemplate whatever issues rise from the subconscious mind to the surface of our awareness with wisdom, to skim them off and abandon them. The heavier stuff deep at the bottom of our mind represents the 'anussaya', the most deep-rooted attachments and delusions. Once the mind is very calm in deep samadhi, they can be identified and removed through profound insight in the 4 stages of awakening: Streamentry, Once-Returning, Non-Returning, and Arahantship.