A literary foil is a character who is added into a story to contrast another character. Their evil makes another character's good stand out, etc.