@crisw makes a good point about the different coats on a dog. Dogs that are basically meant for outdoors and weather resistance/endurance, tend to have excellent coats for shedding dirt, water, ice, snow and other natural substances/materials. That’s the biggest reason your dog magically gets clean.
About licking:
I’d like to add that, yes, dogs clean themselves with their paws, tongue, and even grass, sand or dirt (or your carpet, clothing or bed!). Many times if you have two or more dogs, they will clean eachother in places that are hard to reach themselves. My dog, along with licking his own private parts, will rub his ears and eyes with his paws then lick his paws off – this is how he cleans those two hard to reach places; if I had another dog, that dog would most likely lick his ears, neck, butt and back for him (and my dog would do the same for the other one).
Dogs also lick because they are exploring with their tongue – much in the same way we use our fingers to explore. Other times, they lick to hasten healing of a wound. Many times, they will tend to lick a spot where they are experiencing pain or discomfort (even if it’s not an exterior wound/condition). Sometimes dogs excessively lick themselves but that’s another issue (infection, allergies, genital discharge, anxiety, stress, etc).
Okay, I’ll stop talking about licking now. I can get carried away. :)