When it became the style for men's doublets to extend only a little past the waist, it became necessary to cover the gap between the hose with a codpiece. The codpiece derives its name from "cod," a medieval term for "bag."
Initially, the codpiece was a simple piece of fabric that kept a man's private parts private; but by the 16th century it had become a prominent fashion statement. Padded, protruding, and frequently of a contrasting color, the codpiece made it virtually impossible to ignore the wearer's crotch. The conclusions a psychiatrist or social historian could draw from this fashion trend are many and obvious.
The codpiece enjoyed its most popular phase during and after the reign of Henry VIII in England, who is depicted here. Even though it was now the fashion to wear doublets down to the knees, with full, pleated skirts -- obviating the original purpose of the garment -- here Henry's codpiece pokes confidently through and demands attention.
It wasn't until the reign of Henry's daughter Elizabeth that the popularity of the codpiece began to fade in both England and Europe. In the case of England, it probably wasn't a good political move for men to flaunt a package that, theoretically, the Virgin Queen would have no use for.