The party retraced their steps back through the maze of underground passages, desperately looking for something they might have missed. The rough stone walls were monotonous in appearance, with only the occasional framed art piece, sconce, or disarmed trap appearing amid the dull gray.
"We must have missed something", Talaris told the group, as he wracked his brain trying to figure out the next move.
"Did we light the candles on the other side?", he asked again, as the rest of the group nodded patiently, reminding him this had already been asked, and answered, before.
Back and forth the group went, searching the entirety of the stone dungeon several times, trying to find the missing clue. Ideas, from practical to bat-shit crazy, flew from the minds of the characters, each one examined and ultimately dismissed.
Finally, not knowing what else to do, the group decided to cast Commune, and hope that maybe some divine intervention could help. As the party asked, and then listened to the answer, there was a groan of exasperation. How would they ever have found that out?
Running a game is hard. You have to spend hours coming up with a story line, and making sure you are prepared for all the eventualities. You need your planned encounters, random encounters, and the basic stats of any and all non-player characters the group might interact with. It is way more work than just showing up and playing, so you have to give the person putting in all that extra work some slack if they campaign is not going as smooth as you would hope. That includes situations where the characters have no idea what they are supposed to be doing.
So, as the dungeon master, or game master, how can you nudge them in the right direction when it becomes obvious they need some guidance? If there are NPCs in the adventuring party, then it becomes obvious. One of them can suggest something to help move things along. If there is no available NPC, then perhaps the DM could improvise and maybe insert a clue into the map that was not originally planned.
If all else fails, the actual person running the game might give an out of game hint, if the situation becomes truly dire, or boring, in order to keep everyone happy and engaged.