Do you have trouble during lectures?
Sit in front, close to the teacher. The further back you sit the more people around you talk and the last rows are actually "booked" for people who don't pay attention to lecture at all.
You will hear the teacher clearly and the voices on back will just be like whispers. They might still distract you but it will be easier for you to get back on track because you won't hear the whispers clearly.
On campus:
Get a room, close the door, get some noise canceling headphones and... study.