RPG or Role-playing Games genre is all about character progression. These character-centric games aim to shape and form a character within a particular story. Various quests, dungeons, monsters, bosses and other challenges are often expected in these games. RPGs are fundamentally creative games: even the ones focused on killing and destroying are in fact about maximizing the potential of your character or a party group.
RPGs are also about making consequential choices. Either those be exploring, making tactical decisions to win battles, selectively upgrading gear, choosing which loot to collect or distributing stat points, a player is forced to lose something in order to gain something else. Same limitations also stand true for party-based RPGs.
Role-playing games have player controlling a character immersed in a fictional well-defined world. Often these worlds are very detailed and coherent, everything is in sync; from the surrounding setting to loot that a specific monster found in an area drops. RPGs typically offer very dynamic interaction between a character and its environment so additional focus on scripted behavior or non-player characters is often expected. These video games use much of the same mechanics, setting and terminology as their tabletop role-playing predecessors.
When considering narrative, it is affected by players personal decisions more than anything else. Some of decisions made, like joining a certain guild, or killing a specific NPC character will result in irreversible changes to the narrative. New elements in the story are often triggered by arriving to a certain location, instead of completing a specific challenge. RPG games also have longer cut-scenes, because fans of the genre tend to appreciate them a lot.
Many modern-day games tend to incorporate RPG elements, usually in the form of more complex mechanics, introduction of levels, equipment, stat point distribution etc. Genres with lacking narratives, like Action genre, now incorporates more complex stories to games as well. All thanks to the foundation built by RPGs.