One person is the "dungeon master". They are sort of like a referee. They typically make the initial pitch of the game to the other players. That's something like "I want to do a game about defending a town from zombies" or "wouldn't it be cool to be like bank robbers in a fantasy world?"
The group then comes up with characters they want to play. DND has rules for what sort of powers and abilities characters have. This is mostly captured by "character class" (fighter, wizard, paladin, etc). You might say "I want to hit things with a sword so I'll be a fighter " or "I want to learn magic so I'll play a wizard."
Unlike playing a board game, you also come up with some story bits for your character. So you might play a wizard who's fresh from wizard school and turned to bank robbing to pay off student debt. Or an old wizard that needs money to pay for expensive magical healing. It is pretty wide open, though not totally open. Some new players will try to do like "my dad is the king and my mom is an angel and I can fly and...", and forget to sync their story with the rules parts. And ideally whatever story idea you have hooks into the pitch.
Once you've done all that, you get together as a group (virtually or in person). The DM (dungeon master) will describe the initial scene. "You're just kicked open the door to the bank office. Your tip said it was going to be empty, but two elves are sitting behind a large desk. They jump up, startled and surprised. The room is ostentatious. Marble floors. Stained glass floor to ceiling windows. Magical lights hanging from the fifteen foot ceiling." The dm will probably ask what you do.
Note that the dm generally describes the scene and characters that aren't being played by one of the players. The players in DND generally only control their specific characters. In dnd a player could not be like "the elf runs away in a panic!" or "suddenly all the lights go out!". Only the dm can declare what the world and its non-player inhabitants do. The players control their characters only. (non DND RPGs may differ on this point)
A player may ask questions. "are the elves armed?"
The dm may answer. "you don't see any obvious weapons".
The dm may ask you to roll dice to determine if you succeed at something, notice something, or know something. "Roll perception for me to see if you notice anything else."
When you check if you succeed at something like that in DND you roll a 20 sided die, and often add something to the result based on your character. A smart character has a bonus for knowing stuff, and a strong one to physical challenges, as examples.
"That's a 17 on perception? You notice a magical wand on the desk, half covered by papers, and the elf glanced at it."
Players may declare they're doing something. "I want to lunge for it before the elf picks it up!"
The dm may call for a roll to see how that goes, and narrate the outcome.
This process of the dm describing the scene and the players asking questions / taking actions continues. If a fight breaks out, combat in DND has a lot of specific rules for determining if attacks hit or miss, if someone is taken out of the fight, and so on.
Usually people play for a few hours at a time, and pick up the story the next time they play. So the first session might be trying to rob the bank vault and getting in a fight with the staff, the second might be cracking the vault and escaping, the third might be a showdown with the head of security with a horseback chase. Much of this will be made up by the DM. They may not have expected the players to steal horses and ride into the desert, but if that's what the players do they will make something up. This is the big appeal of RPGs over videogames. You can do anything the group thinks is cool. It doesn't need to be scripted ahead of time.
Much of this as I've described it applies to non-dnd RPGs, too. DND has a lot of very specific things about it I've kind of glossed over. It has very idiosyncratic combat and magic systems, for example. You'll hear people talk about "roll for initiative", "saving throw", "critical hit" and more. Those are details for dnd's rules.
Honestly DND is kind of a bad first rpg. It's very popular but it's also extremely janky, and only does adventuring day fantasy at all well. Games about political intrigue or social conflict don't do well in DND specifically because it doesn't really have detailed rules for them. It's also pretty harsh on allowing players to be creative compared to other games.
Each of the players is playing a role, you're basically pretending to be your character.
Then there's the game master/dungeon master (different systems use different terminology.) Their job is basically to make up the world your characters live in and tell you what's around you.
Then it's up to you how you interact with that world.
So your DM makes up a world, let's say for the purposes of illustrating things it's a generic high fantasy medieval setting, and the kingdom you all live in is being tormented by a dragon. In the game, the DM will play the role of everyone else in the world, the king, the dragon, all of the townsfolk, etc. The players just play their own character.
For convenience sake, DM will usually start off by bringing the party together somehow. Maybe you're all drinking in the same tavern when the dragon attacks, maybe the king has summoned you all to the castle because he's putting together a team to slay the dragon, maybe you're already an established adventuring party and you're just walking into town after your last adventure.
And from there, what the players do is their own choice. Maybe you agree to go hunt down the dragon, either because it's the right thing to do, or because you want the reward money. Maybe you decide to ignore the dragon plot entirely, hop on a ship and start a new life in another kingdom (although nothing is stopping the DM from saying that all the ships were destroyed in the last dragon attack, or the dragon attacks your ship as you're leaving port)
Every character, whether they're a player character or one the DM controls has a list of stats- strength, dexterity, charisma, intelligence, etc. That represent how good they are at different things. A fighter is usually going to be strongstrong, a wizard is smart, a bard is charismatic, etc.
To do an action, you roll dice to see if you succeed. You also add or subtract to that dice roll based on what your stats are. So if you're trying to break down a door, you would add your strength modifier to your roll. So say you roll a 10, if you're a strong character you would probably add on to that, making it an 11 or even higher depending on exactly how strong you are. If your character is very week, you may actually subtract from your roll. Then your DM tells you if your roll with the modifiers added/subtracted was high enough to break down the door.
Same basic idea goes for making an attack against an oponent, trying to be stealthy, just looking around to see if you notice anything, trying to lie to someone, doing first aid after you or a party member has been hurt, etc. Roll dice, add modifiers, and see if it beats whatever number the DM decides it needs to beat.
And using those mechanics you go off on an adventure.
That's of course very simplified, but hopefully that gives you the basic idea.
You may often see tabletop RPG players using minis, maps, model buildings and terrain on the table. This is actually optional. You can do it all in your imagination and by talking it out, but a lot of people find it useful when visualizing combat, or navigating a dungeon, etc. to have little physical pieces they can move around. Many groups will do a mix of both, a lot of stuff happens in the "theater of the mind" without any minis or maps, but bust them out when the situation calls for it. All you need is something to write with to make your character sheets, the rulebooks, and some dice.
Tabletop Role playing Games are games set in a conversation.
you and your friends talk, telling a story and in doing so, observing the rules et of the chosen game.
This is different from just collaborative storytelling because, when it is doubtful wether an action might succeed, you roll dice to decide. When to roll dice will be part of your chosen set of rules.
Dnd and many other traditional TTRPGs divide roles: one person is a Narrator (dungeon master) while each other person plays one of the protagonists (player characters). There are also games that swap role of Narrator, let you play all by yourself without one or any other constellation. Dnd is a classic game with a Narrator.
Now, if you and your friends decide to play, you will need reference to the rules. With help of these, you can craft the player characters, and the Narrator can think of a compelling story to drop these characters into. You then talk about the fictional situation and then the players controlling the protagonists decide how their characters react to the situations the narrator lays out. When something is easily done, ie opening an unlocked door, you just say that you do it. If something is hard and success is dubious, like rappelling over a ravine, you might be called to roll a dice. While playing dnd, this will typically be a 20 sided dice, and you will typically add some modifiers based on your character.
your result will then tell you wether that action succeeded or failed. This changes the narrative, so you take some time to describe what happens and then move on with your conversation-story.
One player is a storyteller called Dungeon Master (DM) who tells the story for other players. Other players are the adventurers, representing characters with their own skills, personalities and alignments.
When the story continues, DM might ask the players how they would like to react to some situation, where to go next or what to say to a non-player character (NPC) that DM controls. When a player tries to do something (like push a stuck door open), DM decides if the player has to make a "check" to see if he succeeds or not. Checks involve throwing dice (d4, d6, d8, d10, d12 or d20 mostly) according to player's character's skill on that perticular action, like "strength" in this case. A physically strong character throws bigger/more dice than a weak one in this case. DM pre-decides the sum that the player has to reach with the dice throw, and then the story continues in a different way depending if player succeeded or perhaps failed and triggered a trap, or something. D&D often includes fighting bad guys (or good guys, if you are playing the villains!) which also works with checks and skills, and the players deciding what they are trying to do. Lots of room for improvisation and imagination, which makes the game so fun.
Dungeons & Dragons is a role-playing game, so you play the role of a character in a game world controlled by the GM (the Game Master, or in D&D they're also specifically called the DM or Dungeon Master). The GM is the person who describes the world and what all the characters in it are doing, except the players control their own characters. The goal of the game is for the players to complete the challenges created for them by the GM, and of course for everyone to have fun while they do it.
Each character has a set of particular abilities that you choose for them out of the options in the rulebook. Dungeons & Dragons is a medieval fantasy game so the options are stuff like Wizards and Paladins (Knights) and Druids and stuff like that. The most basic choices for your character are their race, background, and class: so you could choose to be, for example, a Human Farmer Fighter (a class that uses weapons) or an Elf Scholar Wizard or a Gnome Criminal Rogue (Thief), out of the many, many possible options. You also have stats: Strength, Dexterity, Constitution, Intelligence, Wisdom, and Charisma.
Whenever you do something important, you will most likely have to roll dice. The most common die to roll is a d20 (a 20-sided die). Rolling high is good and rolling low is bad, usually: if you roll high enough, you succeed at what you're trying to do, and if you don't, you fail (which doesn't mean you lose the game or anything, just that you fail at that one particular thing). Depending on your character's stats and abilities, you might have a bonus or a penalty to the roll, which is why you have to choose your character's abilities and stats based on what you want that character to do. For example, if you want to play a character that uses a sword, playing a Fighter and putting a high number in your Strength score will give you bonuses to using swords, while playing a Wizard wouldn't.
The game is designed so that the GM creates a story, but the exact outcome of the story will depend on what the players decide to do with their characters and some amount of random chance with how the rolls go. The most common stories in D&D are usually along the lines where characters play adventuring heroes (more or less) who go around slaying fantasy monsters and gathering treasure, but you can play a game that's about absolutely anything, really.
Honestly, it's pretty easy. Its just playing in everyone's collective imagination with rules.
You go around the table to each player and say what you want to do and the Game Master or Dungeon Master tells you what happens based on your decisions. Sometimes you'll roll a dice based on the rules or if the DM wants to leave something up to chance, but that really is all there is to it.
Player: I want to go down this hallway.
DM: Ok, you reach the end of the hallway, it leads to a dead end but the wall looks flimsy as if its fake.
Player: I would like to try to break it down.
DM: Roll a 20 sided die
Player: I rolled a 19
DM: That's good! The goal was a 14. You easily break down the wall! But as it crumbles, there are enemies on the other side. Time for combat!
Things are little more complicated when you add all the rules and everything together but the basic rhythm is player asks, DM responds and you do that for a while. Its hard to really explain why this is fun but its very much like a video game but without limits. The wall would have to be scripted to be breakable in a video game. With Dungeons & Dragons, the wall may not have been planned to be breakable, but since the player rolled high enough it is now breakable.
I vaguely remember something about them trying to revoke some kind of licensing that let people use their intellectual property, but they ended up settling for rewording the licensing because the backlash from the customers was significant. Ie. Boycotting.
Or something along those lines. Business fucks around, business finds out. They'll try again in the future, but there are plenty of other table top games people can roll dice to now.
Just a small addition to the other comments, who kinda wrote already everything that's important - for your first play try to look for an experienced dungeon master (that might be a good idea independent of the actual meaning of the phrase), it might kill the mood if everyone is trying to figure out the rules at the same time