Meditation as a purification process

What is meant by meditation being a purification or cleansing process - what is being purified, and how does the process work?