In those days it was more valuable than gold. Black pepper stimulates the appetite and aids digestion. White pepper is nothing more than the black peppercorns with the dark outer husk removed. It has a milder taste and is used where you don't want black flakes floating around in your white sauce and such. That is, you taste it immediately, and you don't have to wait on the heat as with cayenne.
Green peppercorns are unripe black peppercorns.
They are preserved in brine and used in a variety of ways. There is a pink peppercorn that comes from Madagascar that is not related to the above family. It has a sweet taste and is very expensive. Every good cook needs a pepper mill or two on hand at all times. These are used for grinding the peppercorns.