Yes, those things. What you want to accomplish. Your goals can be as simple as “kill every monster you meet and take its treasure”. (That was often my goal as a teenaged player of D&D). Or they can be more story-based: Do you want to rescue the princess? Find the enchanted fleece? Seek revenge on the lover who spurned you?
Goals can be shared by the group or personal to your character. Escort Frodo to the Crack of Doom to destroy the Ring is the shared goal of the entire Fellowship. Marry Arwen is the goal of just Aragorn. (I presume!)
If you’re not sure what you should be doing, discuss it with the DM. If you’re the DM, and the players don’t know what they should be doing, you need to give them ideas. This can be really important when running a sandbox adventure like Princes of the Apocalypse or Storm King’s Thunder: Make sure the players know what they can do, and, if they don’t have a reason to go to the Really Important Area They Should Visit, give them a reason. That’s part of your role as the DM. Nothing frustrates players more than not knowing what to do next.
If you’ve got personal, character-related goals, then those are very good ones to discuss with your DM. DMs tend to be very good at remembering the big, important story points whilst forgetting character details that matter to you. If you feel your personal story is going nowhere, you should talk to the DM about it.
Once you’ve got your goals set, you can work out what you need to do to complete them. “Marry Arwen” was a long-term goal for Aragorn. There were plenty of things he needed to do first before he could marry her – become King, defeat Sauron, destroy the Ring. Those sorts of things.
If a goal becomes impossible to complete – or too dangerous at the current time – set it aside, and find another goal. You want to take down the Dragon King at 1st level? Work out something more achievable! If your healer is knocked unconscious in a dungeon, you’ve got a new goal: get out and wake up the healer! Don’t continue to your destruction!
If you’re playing a D&D Adventurers League adventure, typically the goals of the adventure will be given to you in the opening encounter.
Once you’ve got goals, it’s time to start working out how to accomplish them. Research. Question NPCs. Talk to your DM. Discuss the situation with your fellow players. Make a plan.
Long-term goals generally break down into a series of steps or subgoals you need to accomplish first. Choose one of those to be your goal for the session. Work towards that.
Over the years, I’ve discovered that being clear about what you’re doing makes for a much better game. Wandering aimlessly around a swamp? Not that good. Searching the swamp for the buried city of Xak Tsaroth? That’s much better. Be clear on what you want to accomplish, and set out to accomplish it!