Does he have older siblings/cousins/neighbors who may have "shown" him this? If not that, then he just wants what he wants and doesn't know how to express it. Does he seem intelligent? If so, it could be that he doesn't quite know how to ask for what he wants and is frustrated.
Parenting requires patience, and when he whines, you'll have to let him know (in a soothing and calm voice) that he can't have everything he wants. Get used to explaining things this way because he'll learn to trust you to at least try to provide the necessary answers to all his questions. But give him a hug, too - he's so young right now and doesn't realize why he can't have what he wants. But if he's mad about not getting something he shouldn't have, *do not give in to him.*
I know all this seems to be "easier said than done," but a parent's *obligation* to his/her children is to provide love, food, clothing, shelter, and *guidance.* "Guidance" isn't about giving a kid orders and showing who's boss - it's about providing discipline, boundaries, behavior parameters, and general ideas on problem-solving. If you show him that you're going to be consistent, he's going to more quickly learn where you stand on things and won't have to guess. Be firm but fair, and you should realize that if he's throwing fits now, it's going to take an indeterminate amount of time to correct that. Again, patience is a *must.*