A core principle of protagonists, is that in most stories they start out believing something about themselves or the world that isn't true, and striving to get something they want, but then along the way, discovering and obtaining the thing they didn't want, or didn't know they wanted, but that they needed.
This rule can be applied to practically all protagonists, whether they're nice, traditionally heroic types, or more on the antihero side of things.
An antihero is really just a hero whose methods and mindset are less pure and "heroic". It's often hard to define them these days because heroes are a lot more complex and less one-dimensional than they were 30+ years ago. But generally:
The classic hero helps others out of a sense of abstract principle and the ideal of "being good". They save the kingdom because it's the right thing to do, or they care about the suffering of others, even people they don't know at all. The hero expects no reward and is self-sacrificing.
The antihero helps others, but in a more reactive, subjective way. They save the kingdom because they live there, or because one of the few people they grudgingly care about does. The antihero wants to get paid and for either themselves or their legacy or somebody or something they care about to survive. They're motivated not by this abstract set of ideals, but by more earthly, concrete things, and because of this, they're willing to break the rules to achieve their goals; fighting dirty, associating with criminals etc. because the rules themselves aren't meaningful to them, only the people, places and things they care about. The thing that ultimately makes them an antihero, not a villain, is that even if they kill, steal, throw sand in faces and make selfish decisions, they do ultimately make effort to improve things for others, even if it's by the "wrong methods" and for the "wrong reasons". Villains, on the other hand, do selfish or unpleasant things largely to benefit themselves and that hurt others rather than benefitting them.