It depends what you mean by "liked someone else".
If you mean that they actively want to be in a relationship with someone else, then that is an issue and could mean that there is a problem in the relationship with you, or that the relationship is just not what they thought it was. It depends on what stage of the relationship you are at as to what extent you attempt to work on that, but for most relationships at university (where, in the grand scheme of things, relationships cannot have lasted all that long) that may well be the end of it.
If you mean that they are simply attracted to someone else, I would have no issue with that at all. If you only want to be with someone who does not find anyone attractive other than you, I am afraid you are destined either for a single life or unhealthy relationships where your levels of trust and communication are nowhere near where they need to be. You cannot stop people being attracted to other people. It's entirely normal and isn't something that is either blameworthy or shows a betrayal of trust. Indeed, quite the opposite. Despite being attracted to other people, your other half has decided to be with you, and that should give you confidence that they want to be in a relationship with you and not other people. Despite what an awful lot of people on this site seem to think, having feelings and acting on them are two different things. I said in another thread recently that my wife knows of some other women I find attractive that we know, and equally I know of some other guys she finds attractive. Neither of us has the slightest issue with that because, in the real world, it's just a normal thing and doesn't, in and of itself, say anything about the quality of your relationship.