For the Player's Handbook Ranger (not Unearthed Arcana Revised Ranger), does the Natural Explorer terrain type of "Underdark" really mean any underground terrain, such as an underground cave? Of the listed terrain types (Arctic, Coast, Desert, Forest, Grassland, Mountain, Swamp, Underdark) there isn't really anything else that an underground cave would fall under, if not "Underdark."
It depends on the setting.
In some Dnd settings the Underdark is more than just a cave or an underground passage. It's a massive underground network that can potentially span an entire continent. It's kind of like another layer of the world.
In other settings this layer may not exist, or be a lot smaller in scope. In this case it's up to your DM to decide what defines Underdark. It could be any underground area, an especially deep/dark underground area or a specific layer as above.
In my current homebrew campaign setting I just define it as any large natural underground area. This brings it more inline with the other terrain types (Arctic, Coast, Desert, Forest, Grassland, Mountain, Swamp) and also means it is more likely to be useful for the ranger, as the party journeying to the Underdark proper is unlikely.