How do bodies maintain homeostasis?

Organisms maintain homeostasis by perceiving changes in the internal and external environment and then signalling to cells, tissues and organs to counteract those changes. For instance, to maintain a constant internal body temperature, the body senses both the body's current temperature as well as the air temperature around the body. Then, depending upon which is warmer and which cooler, the body then signals for additional blood flow to the skin and the secretion of sweat (to cool the body) or signals for decreased blood flow to the skin and possibly for muscles to start contracting (to warm the body).