It could be product build-up. It could be dry scalp. It could be dandruff (although consider this only after you have ruled out the other two).
For product build-up
If you are a shampoo user, then mix some baking soda into your shampoo and apply as normal.
If you co-wash, then mix some baking soda into your co-wash and apply as normal, making sure to throughly scrub your scalp with your finger pads (not your fingernails).
You can also add lemon juice to your co-wash or shampoo. Lemon is a clarifier.
Try an Apple Cider Vinegar rinse in the shower during your normal routine. I usually add it during the middle of my co-wash.
For dry scalp
Apply tea tree oil to the scalp. I think people put this on the scalp without rinsing it off. (Somebody should correct me if I am wrong.)
You can apply aloe vera gel in the shower after your shampoo or co-wash. Take about 1 tablespoon and work it into your scalp for several mins. Rinse and condition.
In Curly Girl, Massey writes that you can use 1 cup of heavy cream that has been beaten until fluffy (or just normal Reddi Whip) for a flaky scalp. Massage it into your scalp and leave it on for 5-10 mins. Rinse with cool water.
Mix about 1 tablespoon of brown sugar with some conditioner and use this mixture to exfoliate your scalp. Condition as normal afterwards.
I think that we had a thread about this a couple of months ago. If you can find it in a search, there might be some valuable info in the thread.
Here is some information on dandruff.
If you decide to use a commercial or prescription product for dandruff, I would recommend that you coat the length of your hair with conditioner before applying the shampoo. This will protect your hair from any of the ingredients you don't want it exposed to. Concentrate the product only on your scalp.