Antagonist

An antagonist is essentially the opposite of a Protagonist. They are generally a villain. They create the problems for the protagonists to solve in a story. As the main character is just the character with the main role, they can be either a hero or a villain in a story. However, main character villains are virtually unheard of due to the constraints of the character's category, with most characters in that vein falling under anti-hero instead. In exceedingly rare circumstances, an author may subvert this and create a protagonist deliberately made to be unsympathetic.