TTRPG (sometimes TRPG) stands for tabletop roleplaying game. In other words, a game played at a table (though COVID has taught us that they can be played not at the same table) where players take on roles of characters other than themselves. Depending on the game, that could be tech-augmented cyborgs and aliens in a dystopian future, woodland creatures able to speak and go on adventures, or elves and dwarves in a fantasy adventure.
Typically, players in a TTRPG roll dice to help determine their actions. This adds an element of randomness to the game, as a way of imitating how sometimes what you want to do and what you actually end up doing can be different. Each game uses different dice and combinations of dice, ranging from the simple d4 all the way up to a d20 (the d in front is just a shorthand for people to refer to the fact that it is a die, the singular form of dice). While it can be fun to collect actual dice for playing, there are tons of options for dice rollers online or as apps.
There's usually a person who runs the game, called something like a Dungeon Master(DM) or Game Master(GM). Whereas the players have a single character they control, the GM plays everyone else the players' characters encounter in the game, from the friendly innkeep to the big bad boss monsters. This can mean that running a game sounds intimidating, but it's also really rewarding. The GM gets to lead their players through a story, instead of being the one to react, and it can really help learn the ins and outs of a game to run one.
You may have noticed that I've had to explain a lot of terms and abbreviations. That is one of the downsides to TTRPGs: there's a lot of jargon. Some newer games try to make that easier and stick to terminology people might already be familiar with, but some games use a lot of specialized vocabulary. Don't worry! You'll learn it, faster than you'd think, in games that have it. But I'll do my best to explain things as they come up, because no one likes being left confused.
The other potential downside to TTRPGs, especially games like D&D and Pathfinder, is the cost. Books can run around $60 each, and with each new edition there are new versions of books that come out, so it can add up quickly. Thankfully, there are great resources like checking books out from the library (that's why you're here right?), or websites like dndbeyond.com that give you access to at least some game content without needing to spend money. If you play with a regular group of friends, you could pool funds to have a shared copy of one of the books too.
So why play them? They're fun! It's like playing a video game, except you have so much more control over your character's interactions in the world. For many people, it's just nice to step out of their daily lives from time to time. For others, the mathematical challenge of building ideal characters or the tactical challenge of controlling situations in game is what draws them. And besides that, playing TTRPGs can help with social anxiety/social situations, learning how to think quickly in tense situations, and yes, it can help with math skills. In other words, there are a ton of reasons why TTRPGs are great, and some even have research to back them up! So why not play one?