In my time moderating RPG forums - which I have done since I was 14 - I've seen a lot of characters. Good and bad. I've also created very many character, either for RPG sites or for my own short stories.
So how do I do this?
First, pick a name. I generally use baby-names online if I need names in a specific language [Japanese for anime RPGs or various other languages if I can't think of anything] I come up with a story or setting, and then I think about how that would mold a character's life and thus their views, beliefs, and so on. I think, "Is the character pessimistic, or optimistic?" and I go from there.
Example: Susan grew up in a poor family in the 1800's. Her father grew ill and died and her mother was doing what she could to get everyone by [and all that that implies]. Because the situation forced her older siblings to grow up quickly, she had little room for play and felt very isolated.
So the most noticeable traits I would gather for Susan as she grew older are:
1. Very serious [Neutral]
2. Mistrusting of outsiders [Pessimistic]
And from there I can add more as the story goes on. Susan has enough baggage to create an understandable character with room for growth as the story progresses.
Now if you want to try something different, say your character has superpowers or a disability. First thing's first: research. Learn the scientific implications of the character's superpowers [if it's magic, then I don't know. Make stuff up] and build it as realistically as you can.
A common way to put limitations on superpowers is to have it cause mental or physical strain.
Susan has telekinetic powers. She can use these powers, but if she uses them too much or too often or on something too heavy, it causes her heart to race and can cause brain hemorrhages. However, as she uses them she gets more efficient and is able to use her powers more effectively and with less risk of injury to herself.
As for disabilities, research the disability. What causes it? Was your character born with it, or did it happen in their life? Use multiple sources for this, so that you don't wind up with an offensive character.
Susan is blind [My gosh, Susan] in both eyes. She was born blind and is as a result incapable of reading [and being a woman who likely never attended school doesn't help] writing, or finding her way across town. She compensates with a keener sense of hearing and by keeping her arms out so that she doesn't crash into anything or anyone. She tends not to gripe about her lack of sight, as she's never been able to see.
So what is the simplest way I could possibly rephrase all of this?
Make your character realistically and they will not be a Mary Sue.
A character who is hopelessly perky throughout everything is likely a Sue. A character who has a history and reacts to it is less likely to be a Sue.
And one last thing: If your character feels a bit boring, add a quirk or two.