Absolutely avoid cotton!!! I had some really bad chaffing until I switched to synthetic boxers like the ones from Ex Officio. That made all the difference for me. The cotton holds onto any moisture and causes the chaffing. I've swam and then hiked in my Ex Officio boxers and not had any problem.

Bodyglide is great too.