Oily scalp can be genetic, but it also depends a lot on how you wash it and what products you use. Most anti-dandruff shampoos or "for oily hair" ones are too harsh, which paradoxically makes your scalp produce more sebum to compensate. It's a vicious cycle: the more you attack it, the more it defends itself by producing oil.
Try gentler shampoos, preferably sulfate-free. The trick is to wash with lukewarm or cold water, not hot, because heat stimulates the sebaceous glands. Try massaging only the scalp, not the ends, and rinse thoroughly. If you want, use conditioner only on the ends. Some people say that changing how often you wash also helps: if you wash every day, your scalp gets used to it. Try going to every other day for a few weeks even if it's greasier at first, because eventually it will regulate itself.
If after trying this for a month it's still the same, it could be seborrheic or something more specific to your scalp. In that case it's worth consulting about, but first exhaust the basic options. Sometimes diet, stress, or even what pillow you use can play a role too. But the first thing is to change the shampoo and washing technique, because that's what makes the most difference.