It's almost entirely genetic, but there's a few things you can do to help.
Make sure you have plenty protein, iron, and zinc in your diet.
Increase the blood flow to your scalp. How do you do this? Well, I hadn't heard of it, but eja117's post about tapping your head with your finger tips sounds reasonable. The option I've heard is basically hanging upside down. Inversion tables work great for this (and do your spine wonders too).
Cut down on sugars and grains (that turn into sugar). Insulin resistance is thought to contribute to hair loss.
At the first signs of hair loss, do something about it. It's much easier to maintain it using the tips above, or the products mentioned in this thread, than it is to grow it back after its gone.