As any
aquarium book will tell you, on its own, sand is a merely a mechanical filter - it will take out large (compared to a
bacterium) particles, and make the water look
clear.
It won't make it clean. There's still nastiness in there.
Ammonia is not good for you. It's probably what kills the
athlete's foot fungus.
However, sand is a nice place for the kind of bacteria that eat
yucky urine by-products to live, and if you leave it long enough, and keep feeding them, they will eat away all the
crap in short order. This is
Biological Filtration. The chief process is
Ammonia -->
Nitrites -->
Nitrates -->
Algae.
The other main method of filtering water,
Chemical filtration, involves using chemicals like
carbon to neutralise the waste, and
chlorine or similar to sterilise it. It's the quickest method, but can't always be combined with biological filtration, as it kills or starves the bacteria. As
Cletus the Foetus suggested, ground up
coal or charcoal would do nicely.
So, in short,
sand from the bottom of a river, good.
Sand from
homebase, bad. Bits of
coalcharcoal mixed in, even better.
As it turns out, coal may have all manner of impurities, including Mercury, Arsenic and Cadmium. Charcoal doesn't.