Frogs are amphibians. This means that they need to be somewhere nice and wet. When it is hot outside, they like to find some water, like a pond or river. If there isn't one nearby, they can hide in cool, wet spots like under your house or under the leaves in the forest.
Still most frogs like to sunbathe, but need water or moist places nearby to prevent dehydration.