There are several differing types of this, the most common being bathing. As the water is striking your body, envision the psychic dirt being flushed down the drain along with the physical dirt.
The next most common is simply grounding the negativity straight into the Earth. See the “dirt” as a blackness or tar on your body and see it flowing off you into the ground. This works best if you are outside and barefoot. Make sure it goes very deep into the ground so someone who walks over that area later does not pick all that trash from you.
The last is sued when you are casting High Magick (a pretentious turn of phrase, but one meaning ceremonial magick). Bathe very well and scrub every inch of your body. You may have no sex, food or cigarettes for 24 hours before. You may have as much distilled water as you wish. After your bath, stand nude (or robed) and smudge yourself. Take a cedar (or some other type) smudge and fan the fumes all over your body. See the smoke carrying the negativity away from you. Draw pure energy from the elements and the Sun and Moon. You are now ready. Done on a waning or new moon.
Stars light your path.