In fanfiction, it's very common for favoritism to show up. After all, everybody has their preferences and regardless of their role in the story, it's never a uniform thing. However, one frequent thing is for the author of a particular fanfic to appropriate a character. Rather than creating an original character, this author will overhaul the role, importance and personality of a particular canon character they like in order to make the character "ideal" (i.e., a stereotypical Mary Sue).
Every canon character in fanfiction represents the fan's re-interpretation of that character. They aren't the original author, so they don't have first-hand knowledge of the inner mechanics beyond what is shown in the released materials. The most they can do is try their best to emulate that character using the information they have, with varying levels of success. This trope refers to the more extreme situation, when a character's most basic, undeniable traits are flat out ignored in favor of the author's own views and/or desires. For example, a fanfic of a Harem Anime that takes the Shrinking Violet character and has her all of the sudden grow a backbone and force her way into being the official romantic interest of the hero, or that turns the hero from an ordinary Audience Surrogate into a hyper-charismatic badass who is instantly able to woo any woman in seconds, would definitely be a case of this trope. In short, it's as if a spirit (the author) possessed their bodies and took over to create a Possession Sue.
Usually, it's secondary characters that get this treatment, but it's not unheard of for main characters as well. For example, if a fanfic of Inspector Gadget has the title character all of a sudden gain a near-omniscient level of detective expertise (hell, even just half-decent detective skills) and singlehandedly expose and arrest all of Dr. Claw's organization, without this being somehow subverted at the end and/or played for laughs, that would definitely be a case of this.
The traits that mark a Possession Sue are just as myriad as the ones that mark a regular old Mary Sue. As a general trend, authors that make these characters also tend to strip away much of the original characterization in the process of "idealizing" their favorite character. They might be made uber-competent, turn out to be extremely beautiful after all, outshine every other character, gain new and previously unknown powers, have a revelation of being someone's long-lost child and what-have-you from the Common Mary Sue Traits. Other times, they're rewritten to resemble the original author more closely, such as having a similar family situation, or having identical tastes in fashion and music. Most importantly, though, is that the character is favored by the author to such a point that the same Mary Sue favoritism present in other characters and the universe come up.
As far as the Mary Sue subtypes go, any of them can apply, but the single most common is Fixer Sue. After all, the author is pretty much applying their own viewpoint on how the canon should go and hijacking a character to "fix" it is probably the single biggest inspiration for rewriting a character. Otherwise, the author might just be trying to avoid the stigma of original characters while still wanting a mask to wear as they insert themselves within the story.
The term most often used for this is actually "Canon Sue," but there's a second, different (if related) trope also known as Canon Sue. Where a Canon Sue is a canonical character that has Mary Sue traits in the original work, a Possession Sue is a canonical character that is given Mary Sue traits in a fanwork. When canon writers forcibly turn their own characters into Mary Sues, Possession Sue-style, it's a form of Character Derailment. Often overlaps with Self-Insert Fic.
Compare with the O.C. Stand-in, which is not necessarily a Sue, but does share the characteristic of being a canon character—in this case, an underdeveloped Flat Character—overhauled to an author's liking.
Contrast Copy Cat Sue, which, rather than stripping the characterization of a canon character to make them "more appealing", instead synthesizes a blatant clone of a canon character.