Disclaimer: everything in this post refers to Arts or Science degrees only, or any other broad degree. Small cohorts like Medicine will obviously be different. Also, this is only based on my own personal experience, so any naysayers can go piss up a rope.
The first thing you need to know is that the overwhelming majority of people you meet through class, you will never see again. That's just how these degrees work; in any first or second year unit, you can have a mixture of people at anywhere from the first to the fourth year (or higher!) of their degree. And since many units count towards multiple majors, minors or sequences, many times you and the person sitting next to you are on very different pathways. Given this chaotic nature, classroom friendships are difficult to maintain unless anchored in some external source of unity. That isn't to say don't try and make friends in your classes; at the very least, it'll make each semester less boring. But don't rely on it as a reliable way of making long-lasting friendships.
By and large, the majority of your university friends will either be people you knew before university (high school, tutoring, language school etc.), or extensions of existing friendship groups (friend of a friend, mate's cousin, so on and so forth). It is easier to expand than to create anew, and pre-existing friendship networks and frameworks provide a firm foundation off which new friendships can sprout. Being actively engaged in your social life will be of immense help here; go to parties, go to birthdays, go for dinner, go to the pub, get out there.
The other source of new friendships, depending on how involved you become, is cocurricular or extra involvement, like clubs, societies and student organisations, or going on exchange. Shared experiences in an alien environment provides a focal point around which much social interaction is able to coalesce, and provides the impetus for ongoing communication, the basis of any successful friendship. Prolonged involvement also provides the opportunity for interaction with a fresh intake of students on an annual basis. This relies on you being proactive in seeking out new people and following up on any interactions.
The thing is, university gives you the freedom to pursue friendships with people who genuinely share common interests with you, rather than simply making the best of a random assortment of individuals as in high school. It also lets you be yourself without having to put on a facade to please those around you. Love to make stuff up and brag about it? You'll find friends. Hate humanity in general and dislike social interaction? You'll find friends too (though why you would want to is beyond me...). It's an important phase of self-discovery and an integral part of that is getting out there and seeing what other people are like, and using that to shape your own development.
Of course, there's nothing that says that you
have to make new friends when you're in university. Indeed, some people might leave university with fewer friends than when they went in. There's nothing wrong with that, as long as it was the intention of that person to do so. Regardless of the human need for some sort of external contact, university is very much what you make of it, and if you want to make it a lonely, desolate, work-focused experience, then that is your right in this democracy.
The other thing to remember is, no matter how friendly or likeable or open-minded you are, there are going to be people that you meet who you simply won't get along with - whether it's them not liking you, or you not liking them, the end result is the same. Every situation will be unique but in general, don't bother trying to patch things up with the other party. Rare is the relationship that goes from enemies to friends, no matter what Hollywood might attempt to tell you.
By the time you get to the later years of your degree (penultimate or final), you might find trying to make new friends a taxing and thankless chore, because, to be frank, you really won't give a fuck anymore. Chances are you'll already have your own friends, your only desire is to complete your degree, and there's no common interest you share with younger students. If that's the case, don't bother. It'll be clear as day to the other person that you don't really want to be there, so forcefully prolonging the contact just makes it awkward and disrespectful. Focus on what you want to get out of your few remaining years at university and prioritise those goals. That being said, it's not impossible that you'll make new friends. Don't be too rash to dismiss possibilities.
If you've got exams coming up, good luck. Study hard. I might have a parody or two posted here and on Stalkerspace in the coming weeks. Maybe I'll update, maybe I won't. Ramble ramble ramble.