There are a number of conflicting definitions of a ‘Mary Sue’. Some insist Mary is a wish-fulfillment version of the author; others that she is any character who is implausibly talented in an implausible number of areas (including stunning good looks), and so on. In my opinion, a Mary Sue character — sometimes termed Gary Stu for the masculine version– is defined by what they do to the story. True Suefolk warp the fabric of the fictional universe in which they roam as the singular most important being. From this basic definition, we can identify some common Sue subtypes.
Perfectly Perfect Sue: This character is loved by all of the cast except the bad guys for an obvious reason: they’re amazingly good at everything. Usually, they’ve got model good looks. They’re also genuinely good natured– hobbies include world peace, justice, and being kind to puppies and children. These characters can actually work in certain genres that are deliberate escapism; in other contexts, the character can become annoying due to lack of realistic character development or conflict (it’s hard to maintain suspense when a character is the best at everything). Often, they become the narrative equivalent of a photobomber, taking up story space that the audience would rather see devoted to the more compelling side characters.
Informed Sue: The supporting cast and/or the narrator gushes this character is gorgeous, athletic, brave, blindingly intelligent, and exquisitely empathetic. Their opinions are supported by precisely nothing in the actual events of the story, since this character has no discernable personality traits or autonomous actions whatsoever.
Sociopath Sue: Unlike Informed Sue, Sociopath Sue has lots of personality traits, all of them horrifying. The key difference between them and an overblown villain, however, is that Sue never faces narrative consequences for their actions, and in fact continues to be fawned over by the other characters against all reason. This is particularly jarring when villains are extravagantly punished by the narrative for doing the same thing as the Sue (bonus points if the ‘villain’s’ behavior was more sympathetic, understandable, and/or benign).
The point of identifying these characters, of course, is that you can detect Suefolk tendencies in your own characters and squash them. The best and easiest way is to give each character their own agenda that’s separate from the protagonist, and give the protagonist a realistic sense of their own competence and importance as well.