The best way is too get better grades than them in class. Or if they get a question wrong, immediately say you know the right one. Well that's the focused on school way. If you wanna start shit, you can always say, oh that's an interesting web page you are looking at, and just be nosy.
When people talk loudly on there phones in the library I just say, "Oh my god no way, that's so interesting."