Sometimes I do, sometimes I don't. Based on some factors:
-If I'm at the gym at school I don't have the headphones on. I like to talk to people at the gym, and don't mind being approached at the gym. It's not like people come to talk me during me sets, so it fine. I'll also talk to people from time to time. Everyone different, but small talk at the gym is cool by me. Makes things more fun.
-a benefit of music while lifting is it also gives you a good sense of how much time has passes between sets, or over the course of the workout.
-If I'm doing cardio, it helps to stave off boredom and stops me from focusing on how tired I may be, so I will wear headphones. Since I only do cardio at the gym close to my home, a lot of the time I wear headphone there. I haven't done much cardio lately, though.
-When I do listen to music, I don't have a playlist full of hardcore gangsta rap and the most hardcore death metal subgenre or anything. Rap, R&B, Pop, Rock, and even electronic music have made the playlist. Usually mainstream or more pop-friendly stuff. Other times I'll just listen to a hip hop album the entire way through.
-I'm actually trying to avoid using headphones more and more, not just at the gym but on the bus and other places. It's all part of an effort to be more sociable and whatnot. Wearing my headphones as much as possible ruins that.