Combat damage is the damage dealt by attacking and blocking creatures during the combat damage step. It is specifically
the damage done as a result of combat. Fog
can be cast during any phase/step of a turn, but it'll only prevent combat damage.
Let's be clear: damage that happens during the combat phase is NOT
necessarily combat damage. For example, a Lightning Bolt
deals noncombat damage, regardless of whether it's cast during a main phase or combat phase.
Again: combat damage is the unique type of damage that is dealt as a turn-based action by attacking and blocking creatures at the start of the combat damage step.
Edit - And, as Midlight pointed out, Fog
doesn't retroactively prevent damage that has already been dealt. You can cast Fog
during your post-combat main phase, but it won't do anything at that point.