Elephants throw water over themselves in order to keep cool. According to BBC News, desert elephants have a little pouch in their throat where they store water so that they can spray themselves with it when the temperatures become too hot.
The Serengeti National Park explains that elephants often spray themselves with water and then spray themselves with dirt, which helps it to stick to their hides. They do this because the dirt protects them from both sunburn and from biting insects.
Water is very important to elephants. They use it to bathe in and to drink. However, if the need arises elephants can go several days without water. They even dig for water in dry river beds. In order to drink, they suck water into their trunks, then put the end of their trunks into their mouths and suck the water down. They cannot actually drink through their trunks.
Elephant trunks have other important roles outside of giving water and dust baths. Elephant trunks are limber and dexterous like fingers. Elephants use them to pick up small seeds and nuts. Trunks are also used to discipline unruly young elephants by slapping them. Trunks are an important means of communication. Elephants wave them when agitated and trumpet through them as a sign of challenge or aggression.