An antagonist directly opposes the protagonist, while a foil indirectly develops the protagonist by providing contrast.