Categories are built into MediaWiki. See the Help:Categories page for more details.
Not everyone realizes however, that subcategories are also built in. For simple instructions how to create a subcategory see the How to create new categories or subcategories page at Wikimedia Commons.
When you assign pages to categories, then the actual category page, listing all pages marked with that category, are availbale automatically. It’s all just built in and ready to use.