How do heating and cooling systems work?