There's a long-running joke that in Dungeons and Dragons, you're almost never in a dungeon and you almost never see a real dragon. As funny as that is (and it can definitely be true), some of the most famous adventures created for the game do actually revolve around dungeon crawls, or exploratory missions into enclosed game spaces like cavern systems, ancient ruins, haunted castles, and, yes, literal dungeons.
Take for example the infamous campaign module, Tomb of Annihilation. In this adventure, players are sent into the wild jungles and ruined cities of Chult in the Forgotten Realms setting to retrieve an item that will reverse a dangerous curse. This game is notorious for being deadly and difficult - it's called Tomb of Annihilation for a reason! It's full of tricky puzzles, dangerous combat, misleads and betrayal, and tight deadlines that might just be literal. Players both fear and love this particular dungeon crawl for its intensity and challenge and feel a real sense of achievement upon successfully completing it (albeit usually after running through two or three characters).
It's that sense of excitement, danger, and accomplishment that makes dungeons really fun. So why don't we explore how to create, fill, and run your own dungeon crawls in D&D?
How to build your Dungeons and Dragons dungeon
The first thing you'll want to do is decide the purpose of your dungeon. What role does it play in the game - why are your players going there in the first place? In a one-shot or short campaign, the dungeon might be the entire focus of the story. In a longer campaign, it might be a single story arc within the larger story of the world. Either way, there needs to be a reason for your players to enter the dungeon in the first place.
The paper and pen method
If you're very determined (or very old school), you can put together a great dungeon with a pencil and a piece of grid paper. Just jot down the general shape you want your dungeon to take and note out where your doors, traps, monsters, and loot are. If you choose to do this, I highly recommend writing out the legend as you go - symbols are only good shortcuts if you know what they mean.
The random generation method
My favorite method of creating a dungeon is to use a random generator - like this one. Random generators save you the brainpower of trying to make rooms that make sense and fill them with things so you can focus on running the adventure. That being said, I've always found that these dungeons should really be tweaked and adjusted for better coherence before they're actually playable.
How to fill your Dungeons and Dragons dungeon
Once you have the physical dungeon, it's time to fill it with all kinds of fun and terrifying things for your players to explore and enjoy. You've probably got an idea for what the theme of your dungeon is and why your players are there - that is, if you followed the advice I gave above - so now you just have to figure out how that reason fits into the space you've created.
Make it a challenge to fulfill that reason
As a general tip, it's a good idea to make your dungeons scale with your players as they explore. That means that the easiest challenges should be in the first explorable rooms, and the challenges should get harder as they get further into the dungeon. You don't really want to put an adult red dragon in room one and just one mimic in room two, for example; your players might feel cheated or as if they're not making any real progress is the difficulty of the rooms is randomized.
That being said, you'll want to leave a few empty or easy rooms throughout the dungeon so that your party has room to relax, get a Rest in, and regroup to come up with or adjust their plans. Also, it's funny to watch players inspect every inch of an empty room because they suspect a trick.
Fun monsters to put in your dungeons
Here are a couple of monsters that I recommend you put in your dungeons for the sheer joy of watching your players face them.
Oozes of any kind are really fun because they can blend into shadows or look like simple puddles on the floor, and while they're relatively easy to beat, the shock factor of running into one will put your players on edge and make you look quite clever.
On the note of surprise attacks, mimics are a D&D classic for a reason! My suggestion, though, is to put mimics in places the players wouldn't expect. Yes, that lone chest in an empty room is suspicious, but is the door? The rug? The candelabra? I also recommend looking into hoard mimics, to make looting a little more challenging.
Twigblights and needleblights are criminally underused monsters. Walking into a room full of trees in a decrepit underground dungeon is bad enough, but when the trees are trying to kill you, it's much worse.
Shambling mounds are another underused bad guy that can be fun to show off. Big, rambling piles of moss and decay that can bite your head off? Yes, please.
Giant killer rats. Enough said.
Dragons, giants, and liches all make excellent end-of-the-dungeon bosses, but can I recommend an illithid lair? Illithardi are terrifying alien monsters that reproduce via infection of other living things with worms placed in...well, go look it up. They make for an excellent big bad group and a tense rescue and escape mission setup.
Conclusion
At the end of the day, dungeon crawls can look like whatever you want them to. They can be full-on campaigns or inserts into existing games, massive challenges in their own right or gateways into further questing. As long as you and your players are having fun, you're doing exactly what you need to do with a dungeon crawl.
Now, go ahead and open the door. What's the worst that could happen?