Men wearing tight pants and underpants:
The Gemara implies that it is forbidden for men to wear pants unless they are made like Batei Shukayim. [This however only refers to pants that are made with a special pocket that is tightly fitted for the size of the Eiver, and hence can cause one to be aroused. It also includes a prohibition against wearing pants that are tight around the Erva area due to the friction and arousal that they cause. However regular non-tight pants that we wear today are not included in this prohibition at all, and it is obvious that throughout all generations people did not walk without pants.]
It is forbidden to wear tight fitted clothing that cause friction and arousal to the Erva area.
May one wear underwear, boxers and the like?
It depends on the tightness of the fit. Tight fitted underwear is forbidden to be worn due to it causing arousal. The same would apply to tight fitted boxers. However baggy boxers and loose fitted underwear may be worn. It is customary amongst many Chassidic Jews to wear loose boxer style undergarments rather than underwear due to the above reason.
May men wear jeans?
Many jeans are tight fitted and hence may not be worn if they cause friction and arousal in the Erva area.
 Rama E.H. 23/6
 Perek Kol Hayad
 Batei Shukayim are legging shoes that would cover the feet and reach up until the thighs. It would not cover the Erva area. These are similar to knee-highs. [Meir Oz 128/5-4]
 The reason: As this can lead to spilling of seed. Now, although one can explain the Gemara to only refer to their times when they ate Teruma, and there is thus worry that one’s body may become impure, nevertheless from the fact the Rosh records this ruling it implies that it is forbidden even today. [Rama ibid]
 Pischeiy Teshuvah 23/4 in name of Atzei Arazim; Aruch Hashulchan 23/7
 Ezer Mikodesh 23
 Pischeiy Teshuvah 23/4 in name of Atzei Arazim; Ezer Mekodesh 23; Aruch Hashulchan 23/7