You always hear about how important it is for your protagonist to have a goal. That's true, but equally important is the "why" behind their goal. You'll create a better-defined and more compelling character if you also spent time coming up with the most powerful motive for their actions.
Let's say that both Adam and Gary have the goal of completing a marathon.
Adam wants to do it to raise money for a charity. Not a bad reason. It suggests that Adam is a good guy, willing to go out of his way to benefit others.
Gary wants to do it because his daughter is running and he wants to show her that he can actually follow through doing something together--which he never did when she was growing up. He hopes she'll give him a chance to be a better father.
Which character do you think you would care about more?
I think it would be Gary because his goal is personal and emotional. If we've ever let anybody down or have ever hoped for a second chance in any relationship, we may identify with him at least a little.
WHAT'S AT STAKE?
The other difference is that if the charity doesn't get the money one participant hoped to raise it probably won't be a huge blow. But if Gary doesn't finish, or at least make a massive effort, his daughter will feel he hasn't changed and there's no reason to trust him now. We can imagine how painful that would be for both of them.
The more your protagonist has at stake, the more we will care about their goal. What's at stake doesn't have to be objectively huge. Sure, in many stories it's a matter of life and death; however, you can get equal drama from a story in which what's at stake is whether a young girl is able to earn $20 to buy her ailing mother a Mother's Day gift. Her "why" is that she wants to show her mother how much she loves her.
THE "HOW" CAN CHANGE, THE "WHY" USUALLY STAYS THE SAME
Sometimes in the course of the story, the protagonist realizes the "how" they have chosen is not actually going to deliver the result they want. For instance, Adam might start off thinking he can buy his daughter's forgiveness with presents. But then he realizes he will have to give of himself instead, and that's when he signs up for the marathon.
Likewise, maybe the little girl comes to understand that something she makes herself will mean more to her mother than anything she could buy.
Thinking about the different ways that your characters try to fulfill their "why" can be a rich source of incidents and turning points for your plot.
Antagonists have their own "why" as well--or at least they should. If they don't, they won't seem three-dimensional. An antagonist who does evil things just for the sake of being evil comes across like a cartoon character. An antagonist who does evil things for a reason we can understand is much more realistic.
REVEALING THE "WHY" IS PART OF THE AUDIENCE ARC
The character arc refers to the transformation your protagonist undergoes as a result of the events of the story. There can also be an audience arc. By that, I mean a change in how the audience sees your character. Let's look at an example:
Recently I saw a reality show in which a restaurant owner was hostile to customers who asked for any minor change in a dish (like 'no onions'). Why? It turned out that when she was a child she was constantly criticized for not being able to do anything right and told she would never amount to anything. When a customer asked for a change in an item, the restaurant owner heard it as another insult and she responded angrily. When that was revealed it changed the way I regarded her.
A movie that has an audience arc is "As Good As It Gets," in which the Jack Nicholson character was mean and seemed to try hard to make sure nobody would like him. As the story goes on, though, we come to understand how he got that way, and it changes how we regard him. He also has a character arc, but our feelings about him change before he does.
The shift in an audience's perceptions is one of many ways of keeping them involved in your story.
HINTS MAY BE ENOUGH
If understanding the 'why" is crucial to your story, you may want to go into some detail and maybe even use flashbacks to reveal it. However, that's not always necessary. Often giving the audience some hints is enough to have them become more invested in your story.