Mary Sue/Marty Stu is an original character (OC) that the author creates and inserts into an exsisting universe and ultimately becomes the focus of said universe. The character is drop-dead gorgeous, an excellent fighter (in most cases, better than the exsisting characters in said universe), powerful (in strength or magic), completely flawless, and in most cases, is a relative of any already exsisting character or is the love interest of already exsisting character.
All characters in said universe adore this OC to the point where they would fall over each other to impress him/her. In many cases, one or more of the existing characters actually falls in love with said original character and the OC's name is always a "cool" name that the author wishes s/he had.
OC usually has a tragic past that comes up at chosen moments to earn pity/sympathy from the reader as well as established characters. OC also most likely knows more than one language, and is usually helpful in their "plot".
Why is Mary Sue/Marty Stu hated so much?
What's there not to hate? The character is perfect and, in more cases than none, throw all of the established characters completely out of character to fit into their vision of a dream date. The character, though always thought a three dimentional character by the author, is in fact a one dimentional character that is placed in a boring and predicable plot. The character, although having "all these redeming qualities", can not emotionally connect to the reader, unless the reader has the same fantasies as the author... which sometimes happens.
Also, why are they hated so much? Because they are everywhere!! If you check on Fanfiction.net, I can almost garentee that about 90% of the stories there are self-inserts of some form or another.
Middle Earth Under Assault
In the case of Lord of the Rings fandom for which we are dealing with at this site, the character is usually an elf, a hobbit or a human from modern time pulled into Middle Earth "against their will"; they can be other species, but from the stats and from what I've seen, these two top all others.
Elves are usually either related to Elrond, Galadriel/Celeborn, and/or are the love interest of Legolas, Elrond, or even
Hobbits are after any of the four main hobbits from Hobbiton.
Humans can be after anyone. Girls after Aragorn (who is enaged by the way) are quite often rangers.
Of course Gimli is more often than not forgotten because he's a dwarf. (What ever happened to beauty can be only skin deep?)
And poor Boromir is always looked down on and scorned for his one weakness. Boromir is a cool character, people!
How To Avoid Mary Sue/Marty Stu
Mary Sues can sometimes be difficult to avoid, but not impossible. There are ways of stopping Mary Sue before she gets published web and before you get insulted when someone calls your character one dimentional.