RPG stands for role-playing game, and the name describes the core idea: you take on the role of one or more characters rather than an abstract avatar.
What that means mechanically is progression. Your characters gain levels, learn new skills, and improve their attributes, and those choices shape how you play. Story usually matters more than in other genres, and dialogue or party composition can change outcomes.
The label covers a lot of ground. Turn-based Japanese RPGs, real-time Western RPGs, action RPGs and the massively multiplayer variety all sit under it, which is why two games both called RPGs can feel nothing alike.