One way to do it is, as user41631 says, with an endothermic reaction.
Another is to use phase-change materials, from which you remove the thermal insulation, to allow the phase-change to take place. Now, all materials change their phases, at some combinations of temperature and pressure. The phrase "phase-change material" is used not to classify materials, but to identify the paricular use of a material - that is, the material is being used because one of its phase changes happens at a temperature and pressure that makes it useful for a specific process.
Such materials are being looked at for the temperature regulation of buildings.
Let's take a material with a melting point of, say, 18°C, and a high latent heat of fusion. Freeze it, insulate it, and take it into a room that's at 22°C. While the material melts, it will absorb heat from the air, cooling the room.
This principle has been applied in building material design, to provide smoothing of temperature variations. See, for example, Schossig et al's "Micro-encapsulated phase-change materials integrated into construction materials", [DOI], from which the following graph is taken, showing the smoothing of temperatures over a week in August , when a phase-change material (PCM) is used (
T_Wall_PCM) - this is compared to an identical room without phase-change materials (
T_Wall_REF) - as you can see, the PCM reduces the amount of time that the room spends above 26°C, providing more thermal comfort for people in the room.