A boxer shirt is a spacious short pants that are worn as men's underpants. The boxershort was introduced in the thirties. Some people like to wear a boxer shirt because they fall well, while others prefer a tight slip that keeps the genitals better in place. There are also tight boxer shorts, which have short pegs but are almost as tight as a slip.
As a garment to swim, the boxershort had largely displaced the swimsuit in the nineties from the beach scene.
There are also women's boxer shorts. Also see
wiki