Taking its name from a portmanteau of Metroid and Castlevania, a “Metroidvania” game denotes an experience that involves exploring a huge map, leveling up a character, collecting power-ups and armor upgrades as you do, and generally having a free-form structure to its progression in a 2D or 3D space combining horizontal and vertical elements.
A better definition is that a “Metroidvania” is a “I know it when I see it” type of game. The two titles that gave rise to the subgenre, Castlevania: Symphony of the Night and Super Metroid, are perhaps still some of the best examples of what constitutes a Metroidvania title to this day but modern takes like Axiom Verge and Bloodstained: Ritual of the Night also offer good archetypes for how to judge what is and is not a Metroidvania title.
In another sense, Metroidvania games combine the platforming action of games like Metroid and Castlevania with the role-playing game elements found in titles like Final Fantasy or even more accurately Secret of Mana. This combination of platforming and action RPG serves as the underlying basis for a lot of the gameplay in Metroidvania titles.
Naturally, exploration and some form of “quest” also form a core part of the experience but really Metroidvania games are defined by their gameplay execution more than they are any particular narrative. This makes the Metroidvania moniker malleable and the format applicable to a wide range of different game types and, as a descriptor, can render it somewhat vague and imprecise though, again, people know one when they see one.