Are tabletop roleplaying games like dungeons & dragons games? How about ones that de-emphasize rules-based play & focus on the improv aspect, like ones based on apocalypse world?
Usually, yes, but not always. They’re games paired with Roleplaying, or Communal Storytelling. Depending on your group, the amount of game and amount of storytelling can vary. Some groups play tabletops as straight-up games, some of them use the systems as ways of mediating communal storytelling and generating interesting outcomes for the story. Within the framework of communal storytelling success or failure isn’t so important, it’s all about working together to make an interesting story. To this end, DMs rig outcomes, fudge die rolls, and don’t stick to strict game rules, they don’t (usually) compete with the players and the rules are set up to where most of the interactions between DMs and players are indirect, facilitated through impersonal die rolls. There’s even one tabletop RPG called Dread, focused on horror, which features no stats or dice of any kind. Instead, situations are resolved by pulling a block from a Jenga tower, and if the tower falls over, you get caught by the monster or whatever.
In the transition to digital, the meaning of role playing game changed. It stopped being about communal storytelling, with everyone making up a bit of the story, and started being about stats (which even relative to tabletop roleplaying games makes a bit of sense, since the innovation of the earliest Tabletop RPGs over the war games they were inspired by was the addition of stats tied to a character that grow over time). This is why a lot of discourse on RPGs is so confused, because people take the name of the genre literally. See all the people arguing about whether Legend of Zelda is an RPG or not. It fit right in next to the action RPGs of its original time period, but in retrospect it’s very clearly not in the same mold, and some people argue, “but it’s still a ROLE-playing game, I’m playing the ROLE of Link,” or worse, get confused and ask how any game can be a role-playing game since you play a character’s role in practically every game. Some games still try to fit the mold of communal storytelling by having branching storylines and letting players pick dialogue or characterize the character through personality scores that change over time (like fable’s good and evil points, or mass effect’s paragon and renegade points), but in my opinion you can’t meaningfully roleplay without other people, so RPGs on computer systems will always be a misnomer.
There are types of play that aren’t specifically games, like playing Doctor, or a tea party, or the role-playing exercises in improv groups. These don’t have any form of goal or objective, They’re just intended to produce interesting outcomes rather than establish winners or losers.
Tabletop roleplaying games can run the gamut here, it depends on your specific group.