The hypothalamus is the part of the brain that connects the endocrine system with the nervous system, and is shared by all vertebrates. The main job of the hypothalamus is to achieve homeostasis within the body, so to achieve this, it has a great ability to regulate many of the numerous systems in our body. The hypothalamus controls our sleep patterns, our sex drive, thirst, hunger, body temperature, fight or flight response, you name it. It can easily be said that the hypothalamus controls you.
The hypothalamus regulates the body through hormones, but it doesn't produce those hormones itself. The hypothalamus instead secretes various neurohormones that induce the secretion of various other hormones from the pituitary gland. The anterior pituitary gland will produce six hormones at the command of the hypothalamus, and the posterior pituitary gland will secrete two, namely oxytocin and vasopressin.
The hypothalamus is divided up into multiple nuclei, each with a specific task. One nuclei will control sweating while another might control your Circadian rhythm, however, multiple nuclei can be involved in the secretion of hormones like vasopressin. The hypothalamus has a very intricate system of detection to tell it when the body needs regulation. It is able to respond to hormones from the rest of the body, like steroids or leptin. The hypothalamus can get data from your skin and eyes about the outside light which it uses to regulate your Circadian rhythm (your sleep patterns). The hypothalamus is also capable of using your olfactory senses to detect pheromones in the air among other things. All of the data collected by the hypothalamus is used to make sure that your body is in a constant state of homeostasis which is necessary to survival.
The hypothalamus is capable of altering our metabolism which can do a great deal for keeping us alive in times of starvation. It can make our muscles more efficient, slow down the division of cells and both hair and nail growth, and can slow down our organs, all to help us beat starvation and find food. There is a good video on YouTube that explains this quite well: http://www.youtube.com/watch?v=sG9wqZ7Dtx4
Ultimately, a small, almond sized part of our brain is the only thing keeping us from overheating, being severely depressed, not being able to fall asleep, and almost anything else you can think of.