The most common type of Mary Sue is a character based an the author's idealization of themself. Furthermore, because the author is imagining a preferred version of themself, and because faults are overlooked in favor of optimization, a Mary Sue tends to have only superficial resemblance to the author, sharing similar likes/dislikes and a similar spirituality (when applicable), but objectifying things such as worldview and relationships. This type of Mary Sue is more common simply because it's easier to write and is more appealing to the author. This Mary Sue is found in fanfics and original fiction alike. Yes, Mary Sues abound even in professional writing.
The other type of Mary Sue is a character intended to be an ideal match for another, appearing almost exclusively in fanfics. In this case, "ideal match" means that the character's positive traits are exaggerated to render impossible any competition for the love interest. Arguably more pernicious than the "self-idealization" type, the "ideal match" type by its very nature prevents compelling character or plot development, which the "self-ideal" Mary Sue may be able to avoid.
Self-idealization: "That fic was ridiculous. I could overlook the atrocious grammar, but not such an obvious and annoying Mary Sue. What's the point of releasing a story to the unsuspecting public if it's only written for the masturbation of the author's ego?"
Ideal match: "It's hard to find any other story that's so dull as one that has an ideal match Mary Sue in it. What is there to be interested in if the pair never has any trials to overcome?"