character of a work actively opposing the protagonist

An antagonist is the character in a story who stands in opposition towards the protagonist. As an example, in the Disney movie The Lion King, the main antagonist is Scar.

While the most common practice is for a hero to be the protagonist and the villain to be the antagonist this is not always the case. As an example in the manga/anime series Death Note protagonist Light Yagami was the villain as it was his goal to rid the world of criminals in order to create his own ideal "utopia" and rule it like a god while antagonist L was the hero as it was his goal to end Light's psychotic killing spree. Another example is Sweeney Todd: The Demon Barber of Fleet Street where the titular protagonist and the antagonist Judge Turpin were both villains.

A story may also have secondary antagonist, either a partner/accomplice of the main antagonist or an entirely separate threat altogether (though a lesser one). Just like the main antagonist they aren't always villains but they are obstacles towards the goal(s) of the protagonist(s).

It is possible for a protagonist to become an antagonist. A well-known example of this is in the Star Wars movie series, when Anakin Skywalker turns from a Jedi to a Sith, to become Darth Vader.