To ritually cleanse the body from defilement (by drinking dissolved earth).
This is especially done when one has eaten forbidden (haram) food or drink, is about to marry or has married a non-Muslim. A pinch of dirt is placed on the body of a child when he/she dies to cleanse him/her since he/she hasn't yet been circumcized.
If you have eaten pork, you should have an imam cleanse you.