Morally grey: A character who does too much bad to be a good person, but does too much good to be a bad person.
Sympathetic villain: A character who is a bad person, but whose backstory/character arc makes you feel sorry for or sympathetic towards them.
Anti-hero: A character who does bad things to achieve a good goal.
Anti-villain: A character who does bad things to achieve a goal that they believe to be good, but is actually messed up.
Just plain annoying: A character who does bad things to achieve a bad goal but has one throwaway line about a hard childhood that is expected to put them into one of the aforementioned categories when in reality it just makes them annoying
how is it that loki is all of these at the same time
inconsistent writing