When your hair loses moisture, your scalp or something in your scalp produces moisture which makes it greasy; if its greasy, either your not getting the moisture you need through shampoo, etc.. Or its just from genetics.
Not washing your hair often, swimming in lakes, overused hairbrushes, natural oils, and if you use too much conditioner. Also, if you don't completely wash out shampoo and conditioner it'll have that effect.
You could be shampooing with something that strips too much of your scalp oils off, which tells your sebaceous (oil) glands to produce more - vicious cycle. Look for a shampoo that states "pH balanced" & problem solved. I am a licenced cosmetologist so this should work. Try the new shampoo for 2 weeks, & don't use anything else. Then continue using it once you see results!
Body oil. Our bodies secrete oil. That mixed with dirt is what causes blackheads and pimples. Its what makes your face feel oily if you dont wash it. Your hair needs some oil to be healthy but too much is gross.
Some people have hair that just gets oily. You can wash it everyday and it might still get oily. It doesn't mean there's anything wrong with it. Actually, the oil is a little bit healthy. Check with a doc