AntagonistThe antagonist is a narrative entity that works to prevent the protaganistprotagonist from achieving his/her goals in the story and must be overcome, creating the conflict. In In romance fiction, this would be the "Other Man" of the love triangle. In legal fiction, this is the opposition party in the trial. Antagonists need not be personified, as there are 3 or 4 types of stories: Man vs. Man (where the antagonist is depicted as a person), Man vs. Self (where the antagonistic force is internal to the protaganistprotagonist, either physical (overcoming a handicap) or mental (overcoming a character flaw)), Man vs. Nature (where the force against the protaganistprotagonist is simply so because it is in it's doing what is natural to it), and Man vs. Society (where societal beliefs and morals oppose the protaganists'protagonists' and while the antagonist force may be personified in a singular person, that person is doing so out of conformity with social doctrine common to the setting, not spite against the protaganistprotagonist exclusively. Man vvs. societies areSocieties is a middle ground between man vs. man and man vs. nature as they are antaganisticantagonistic because it is in the nature of the man-made society to oppose the protaganists'protagonists' goals. Antoher Another term could be Man vs. Machine, where "machine" is understood to be a man made-made construct following rigid man-made rules without bias to the impact of those rules.).
A villain is a character who the audience is supposed to understand is morally inferior to the values of the author and creators. While it's often the case that villain characters are also antagonistic characters, they are not the same thing and an antagonist need not be a villain (conversely a protaganistprotagonist need not be a hero). A villain and an antagonist need not even be represented by the same character in the story.
For example, there are cases where we have what's called "The villanous Protaganist"villainous Protagonist" where the protaganist'sprotagonist's story is depicted as morally reprehensible to the audience's general moral values. Some famous examples of Villainous ProtaganistProtagonists include Anikan Skywalker from the "Star Wars" Prequel trilogy, Walter White from "Breaking Bad," and arguably Thanos from "Avengers: Infinity War." The story is clear that all three are the primary characters we will be following and that they are not noble people, but their descent into villainy is the subject of the story. Notably in "Breaking Bad" we have an example of both a VillaniousVillainous Antagonist and a Heroic AntangonistAntagonist for Walter White, with Gus Fringe as a villain and Hank Schraeder being examples of a heroic antagonist with respect to Walter. Both are actively working against him, but one is clearly morally inferior to Walt (Gus) while the other is Morally superior (Hank).
There are even times where the villain and the antagonist are not represented by the same character. I like pointing to Disney's Mulan (1998) as an example of this. The villain is clearly Shan Yu, and probably one of the worst villains ever created by the company, especially during the Disney RenesanceRenaissance era of the film. But while he is the villain, the antagonist (the force preventing Mulan from achieving her goals) is her own society's strict gender norms. The opening song "Please Bring Honor To Us" is arguably the closest the film has to a villain song. It outright states the goal of the society (We all must serve the Emperor/ Who Guards us from the Huns/ A man by bearing arms/ A girl by bearing sons) and shows the flawed values that oppose Mulan's goal. She wants to save her father from dying in a war in service to the Emperor by fighting the Huns. Not only does Chinese society say women cannot do this, but they don't even consider her equal to men... the song denotes gender by terms for Masculine Adult and Feminine child (A man vs A girl) showing that not only can Mulan bear arms, but she enjoys no rights afforded to an adult male. Contrast In contrast to the first time, Mulan and Shan Yu meet each other for the first time in the climax. Shan Yu has Mulan's superior (both by societal preference and military law... Shang is a man and outranks Mulan as a Captain) dead to rights and is choking him and says to Shang "You took away my victory!" Only then does Mulan throw her shoe at Shan Yu and respond "No! I did!"
Only then does Shan Yu realized the "Soldier from the Mountain", the person he wants vengencevengeance for, is not Shang but the other person in the room, does he do something no one else in the film, not her father... not the emperor's meddling beurecratbureaucrat Chi-Fu, not her love interest Shang, not even her own father, has ever done: Recognize Mulan, a woman, as the most serious threat to the Hun Army in all of China. At this point, Shan Yu does not even consider the Emperor, who is the guardian against the Huns, to be a threat... but the "Soldier from the Mountains" givegives Mulan exactly what she wanted the whole film and without hesitance to her gender. Of course, theythe conflict over the Huns existing in China, but Mulan doesn't want to fight the Huns... she wants to keep her father safe by fighting the Huns in his place. Shan Yu may be the villain, but he's not the Antagonist... he is more than happy to give Mulan everything she wants.
And with all that in mind, yes, there are cases where an antagonist and protaganistprotagonist can be represented by the same characters. Naturally, I would fistfirst point to Anikan Skywalker/Darth Vader over the first six star wars films, but he holds these roles at different points in the story... a better example is Thanos, who is the central character of "Avengers: Infinity War" and is opposed by equally protaganistictic and antagonistic forces in the various heroes, personified best by three characters: Tony Stark/Iron Man, Steve Rogers/Captain America, and Thor. While each of these people wantwants to stop Thanos, they each have their own reasons and thus are seperatedseparated by motives. Iron Man wants to stop Thanos to protect those on Earth who only he can save. Captain America wants to save everyone without compromising his values ("We don't trade lives" or in another way "We don't kill one person to save trillion more"). Thor is motivated out of vengancevengeance for the few surviving AsguardianAsgardian refugees that Thanos killed and a desire to exact it before Thanos kills anyone else he cares about. And Thanos is motivated out of a desire to remove from anyone else the question of how to deal with the overpopulation of a species taxing finite resources. None of the three Heroes are informed at the same time about Thanos' plans, nor work closely with each other to hash out their strategy. While they don't hinder each other... they don't directly help to work the solution either. The net result is that Thanos'Thanos is able to achieve his goals and the three heroes all fail (Tony not only is stranded on another planet and unable to save anyone on earth, but he would also have been surely dead if not for someone else saving him. Cap ultimately has to compromise his morals and call for the death of one of his fellow heroes and to make matters worse, the death of Vision fails to stop Thanos at all. Cap has killed a friend for no good reason. Finally, Thor comes the closest but fails to produce a fatal blow in a timely manner... Allowing Thanos to point out the failure right before killing half of every living creature in the universe.).
Since Infinity War is largely told from the perspectives of Tony, Cap, Thor, and Thanos, they are all four protaganistsprotagonists... but since the latter's goal is directly opposed to the former three's individual and shared goals, all four are also antagonists to at least one of the four characters.