Evaporation is a cooling process because when liquid turns to gas, it needs more energy, and so it has to take that energy from its surroundings. The energy is in the form of heat, and when the heat energy leaves with the evaporating liquid, the surroundings get cooler as a result. This has to do with the properties of the different states of matter.
Gas molecules move much more quickly than liquid molecules (and particular solid ones). Motion requires kinetic energy, and the faster a molecule moves, the more kinetic energy it needs.
For many people, it helps to think about how perspiration works. The body releases sweat through the pores, but the sweating does not complete the job of cooling. The sweat evaporates, taking heat from the body with it. Inside the molecules, both solids and liquids have forces at work that hold the molecule together and connect it to other molecules. For a solid to become a liquid, and then for a liquid to become a gas, those attractive forces have to break. The source of the energy necessary to break those forces is excess heat in the system. So while evaporation does lead to cooling, it does not lead to a loss of energy. Instead, the energy simply converts from heat energy to kinetic energy for the gas molecules.