It is how far back the history of men's underwear goes; actually, as far as ancient times. as far back as Egypt, we see the emergence of the loin cloth. This was over 7,000 years ago. The loincloth was the first and simplest covering for man and was sometimes even the only covering that the Egyptians were buried in.
The Ancient Greeks, on the other hand, used a wool cloth to cover themselves. The Chiton was worn under an outer cloak. In Greece; it was the slaves who wore the loincloths.
Pull on underpants were created by the 13th Century. These were large baggy undergarments called "braies." These articles of clothing seemed to be worn by all members of society. Even Knights wore them under their armor.
By the Renaissance; the undergarments became more fitted. The Braies were often fitted with a flap in the front usually tied loosely which allowed the man to urinate when he needed to. This flap was called a Codpeice. As the undergarment evolved, the codpeice became larger and larger and began to emphasize the genitalia. After some time; the codpeice became padded and oddly shaped.
In Victorian times; the standard undergarment became the Union suit. This suit covered from the wrists to the ankles. A flap was made in the back for ease of bathroom visits. These underwear graduated to become the Long John. The name Long John was derived from the gear worn by John L. Sullivan, a boxer in the late 1880s.
In the 1930s; Union suits went out of popularity for the boxer brief. Around this time; companies started selling boxers with elastic waistbands instead of button fronts.
In 1934; Jockey began making briefs. During WWI; a shortage in rubber and metal caused the production of underwear to change slightly. Companies reverted back to fasteners and button closures. Also olive drab underwear was worn by the soldiers because the white ones were too conspicuous.
After the War; underwear continued to evolve. Pre-shrinking was introduced and you no longer had to buy your underwear a size larger.
By the 1950s; Rayon, Dacron and DuPont Nylon were introduced and used in the manufacture of men's undergarments. By the 1960s; boxer shorts were decorated with many patterns and colors and the bikini style was introduced.
By the 1970s and '80s many designers were using sexuality to sell their undergarments. Designers such as Calvin Klein, and Tommy Hilfiger were making major advertising campaigns.
As time went by, briefs got briefer and design and innovation made underwear a "fashion" item. Today underwear is sold for various reasons. They are not just for modesty anymore. As a matter of fact; lots of men do not even wear them.