She has an unusual and dramatic Back Story. The canon protagonists are all overwhelmed with admiration for her beauty, wit, courage and other virtues, and are quick to adopt her as one of their True Companions, even characters who are usually antisocial and untrusting; if any character doesn't love her, that character gets an extremely unsympathetic portrayal. She has some sort of especially close relationship to the author's favorite canon character — their love interest, illegitimate child, never-before-mentioned sister, etc. Other than that, the canon characters are quickly reduced to awestruck cheerleaders, watching from the sidelines as Mary Sue outstrips them in their areas of expertise and solves problems that have stymied them for the entire series. (See
Common Mary Sue Traits for more detail on any of these cliches.)
In other words, the term "Mary Sue" is generally slapped on a character who is important in the story, possesses unusual physical traits, and has an irrelevantly over-skilled or over-idealized nature.