Empathy is a core writing tenet, which can be achieved in a number of ways. Here are a couple of the basic ones (with examples from movies):
- make your protagonist an underdog. Have someone bully them. Make the world unfair to them. People want underdogs to succeed. (this is not the perfect example, but it's one of the most black and white applications of this idea, which takes it to the extreme: the latest Riddick movie where the entire world has turned against them; also, Katniss Everdeen is a classic underdog - she's a survivor with few skills among a pack of murderers, forcing her to team up with other underdogs and fight against the odds)
- strip your protagonist of special skills. Make them weak, but good-hearted. Make them flawed, but well-meaning. (eg Forrest Gump)
- make the world ignore the protagonist even though they are in the right (or coversely make it a mystery whereby the protagonist is up against the challenge of figuring out the world and the puzzle they are in). Make them struggle to save everyone else or work towards a goal that is not what it seems. (Identity, all Nolan films are mysteries at their core, or for instance, in terms of games, Bioshock Infinite)
The idea here is to create conflict in the way your protagonist behaves and how everyone else behaves towards them. The underdog approach is the easiest - just make everything unfair and an uphill battle for your guy (or gal) and the viewer or player will grow empathy for them quickly.
If you haven't read this, the gold standard in screenwriting today is Blake Snyder's "Save The Cat". The reason the book is name Save The Cat, is because of a very simple dramaturgical trick you can employ to bias empathy towards the protagonist at the start of the story: the protagonist walks down the street and notices a cat in a tree. To make it more dramatic, the tree is on fire (to add a time bomb). There's no one else around, so it's up to the protagonist to figure out a way to climb the tree and save the furry bugger, or it dies. It's a small thing, but it results in immediate empathy right off the bat, because people want to root for good characters. That's why we call them heroes.
It's possible, albeit MUCH harder, to turn this formula around and build the story around a negative character. Don't try this unless you're Stephen King or something.