In addition to the constant goals listed above, every game session will have some variable goals. Most of these come from the adventure. Some may come from the players' desires. Both types can be used to spur players on to more effective role-playing.
Story goals are objectives the DM sets up for an adventure. Rescue the prince, drive away a band of marauding orcs, cleanse the haunted castle, find the assassin of the late queen, recover the lost Gee-Whiz wand to save the world—these are all story goals.
When the DM sets up a story, he decides how many experience points he thinks the player characters should get for accomplishing the big goal. This must be based on just how difficult the whole adventure will be. If the characters successfully accomplish this goal (which is by no means guaranteed), they will earn this bonus experience.
Sometimes the DM might not have a clear idea of what the goal of a particular adventure is. In such a case the players can sometimes provide the goal, or at least a clue. Listen to what they think they are supposed to do or what they want to do. These can then become the goal of the adventure. Again, assign experience points based on difficulty if they accomplish this.