They have hardly any sweat glands, and these wouldn’t be useful anyway under all that fur.
Evaporating water takes a lot of . By panting, the water on the dog’s tongue is forcibly evaporated. The heat needed can only come from the tongue and inner mouth, which thus cools. Through the blood stream new heat is brought to the tongue. This cools the blood.
We (humans) do something like that, only we have sweat glands all over out body. If we fan ourselves during a hot day, we speed up the evaporation process, and thus the cooling effect of it.