In general, Skyrim quests normally use dungeons in one of three ways:
- Just dump a MacGuffin inside of the boss chest and/or an extra boss at the end of the dungeon, and call it a day. This is the case for most minor fetch quests in the game, especially the repeating ("radiant") quests that you can get from various factions.
- Block the dungeon with rubble, a locked door, or some other physical obstacle, and mark it as "reserved" in the Creation Kit (so that radiant quests do not randomly select it as a possible destination). This is the case for most of the more significant quests, but some of them take option (1) above.
- The quest is given in the dungeon itself rather than by some external quest-giver. Skyrim only has a handful of these dungeon-quests. One of the more elaborate examples is Forbidden Legend. Interestingly, this quest makes use of Saarthal, which is also reserved by the College of Winterhold, but that's OK because both quests were specifically designed to use Saarthal together without conflicting.
As a rule of thumb, if an exterior door (i.e. a door in the exterior world, and not inside a dungeon or building) is locked with "Key Required," it nearly always indicates a quest of type (2) above. If an interior door or chest is locked in this fashion, it may indicate such a quest, or it may indicate that the dungeon must be completed in a specific order. The latter is rare, in my experience; although most dungeons are fairly linear, this is usually accomplished by level design rather than by locking doors (other than the "shortcut back to the entrance" door that is present in most dungeons).