Definition
The English word “mean”, in the sense of “wicked” or “vicious”, is gemein in German. Both “mean” and gemein actually share the origin and a (somewhat antiquated) meaning of “common” — the logic being that things that are common or shared (gemeinsam) can’t be of high value, so the word developed a negative connotation in both languages.
Alternatively, you can use the word böse (which can also mean “evil”, “angry” and “naughty”), or the more colloquial fies or mies. Relatedly, hinterhältig means “devious” or “sneaky”.
Examples
Du bist so gemein zu mir! You’re (being) so mean to me!
Hör auf so gemein zu sein! Stop being so mean!
Das gemeine Volk versteht das nicht. The common people won’t understand that.
Es ist ein böses Kind. It’s a mean/angry/naughty/evil child.
Er ist böse auf mich. He’s mad at me.