What is the function of an antagonist in a story?

A. To prevent the the protagonist from meeting his or her goals.
Hope it helps you mate :)
Answer:
Another answer in A-pex would be, "To create conflict by opposing the protagonist"
Explanation:
A-pex