Homeostasis is the automatic, dynamic maintenance of the optimal internal conditions for functioning in an organism. Within organisms various feedback loops, both negative and positive, regulate internal conditions as well as motivate behaviors to regulate conditions. Both these types of systemic regulation are forms of homeostasis.
All living organisms maintain some degree of homeostasis in their bodies in order to live and function more effectively in their environments. Some internal conditions maintained by way of various behaviors and biological processes of internal organs include body temperature, the composition of various bodily fluids, nutrient, glucose, CO2, O2 and hormonal balances in the blood.
As life evolves it has the tendency to adapt to its environment with further complexity and ways to maintain homeostasis in order to better survive. This tendency can be seen in the example of the evolution of warm blooded creatures. Warm blooded creatures, such as mammals, burn calories in order to stay warm. The ability to regulate body temperature meant freedom from the need to sun themselves to warm their bodies and the ability to survive colder environments.