The Guardian has a collection of ten codpieces immortalized in fine art.
Additional details from Wikipedia:
A codpiece (from Middle English: cod, meaning "scrotum") is a covering flap or pouch that attaches to the front of the crotch of men's trousers and usually accentuates the genital area. It was held closed by string ties, buttons, or other methods. It was an important item of European clothing in the 15th and 16th centuries, and is still worn in the modern era in performance costumes for rock music and metal musicians and in the leather subculture while an Athletic cup protects in a similar fashion...Not to be confused with a willy warmer:
In the 14th century, men's hose were two separate legs worn over linen drawers, leaving a man's genitals covered only by a layer of linen. As the century wore on and men's hemlines rose, the hose became longer and joined at the centre back but remained open at the centre front. The shortening of the cote or doublet resulted in under-disguised genitals, so the codpiece began life as a triangular piece of fabric covering the gap.
Such garments were also worn in Norway, where they were called forhyse, vænakot, or suspensorium. Several examples are preserved in the Norwegian Museum of Cultural History. Sometimes in Norway they would be made from squirrel fur with the fur side inside, to be worn under leather trousers in the winter. On the Faroe Islands such garments are called “kallvøttur” (man mitten) or “purrivøttur” (testicles mitten). There was a tradition in Norway and Denmark, particularly on the Faroe Islands, where a girl would present her boyfriend with a forhyse to see how seriously he took their relationship. If the gift was rejected, this was seen as evidence that he was not yet ready for marriage.