There are several kinds of pepper you can find in the store and they will all come in two forms, a powder or whole peppercorns. As with most spices and most things when you process the food you tend to loose the flavor and that is very true of pepper. When you have pepper that's been ground several years ago and it's been in trucks and shelves and you kept it in the cabinet above the stove where you should never keep spices where it's warm (you should keep spices in a cool spot in the room temperature range) the pepper has lost most of it's volital oils and you are just left with some biting flavor.
Whole peppercorns will last a long time before they will loose their flavor. Of course whole peppercorns will cost more but that taste is worth it. Peppercorns will come in three different kinds or colors too. Green, black and white and these three come from the same plant. They are just picked at different stages. They are not different varieties. Different stages of maturity produces different flavors and colors. The green peppercorns are picked first of course because they are still green and once they go thru a brine for awhile they can sit without molding. Next one that's picked is black pepper. That's the partially ripened berry. The white then is picked last and that's the fully ripened berry. Green is the mildest tasting. Then white and finally black is the strongest tasting pepper. You can come across pink peppercorns but that comes from a totally different plant. In fact it comes from a tree and only tastes like pepper.