Animals can maintain a constant internal environment in a process called homeostasis.
Regulating room temperature depends on a thermostat (the hypothalamus in humans) that detects temperature changes around a set point.
A stimulus in the form of temperature change in the environment triggers a response that activate mechanisms to reverse that change.