John likes to keep quiet (to himself). He rarely speaks to other students.
Is 'to himself' necessary?
You can also say that he keeps himself to himself.
You will hear "he kept himself to himself" a lot in one rather disturbing set of circumstances.
Usually, when someone has gone on a wild killing spree or it's discovered that they've killed loads of people over the years and buried them in the back garden, journalists will interview the killer's neighbours. It's amazing how many times you'll hear "We can't believe it! He seemed like such a normal guy - always kept himself to himself."
In fact, I'm starting to think that if anyone ever describes someone else to me in that way, I'm going to make a point of staying away from that person just in case!