Each strand of hair has its own sebaceous (oil) gland, which keeps the hair shiny and waterproof. The release of oil is caused by hormones that are the same as the ones that causes acne.
Washing your hair every day or every other day can help control oily hair.
Don't scrub or rub too hard — this doesn't get rid of oil any better and can irritate your scalp or damage your hair.