In the Rise of Nations series, the Fog of War represents the area where allied units currently cannot see. In this area, only neutral buildings, structures, map features such as resources, and last known locations of enemy buildings are shown. The Fog of War hides enemy units and any activity.
This shroud is temporarily lifted; when a allied unit moves, their line of sight peels away the fog, revealing and updating the player with any changes to the environment. When that particular unit leaves the area again, the fog of war slowly fills that area again, concealing any enemy units.
This emphasizes the way units see. If a unit is detected, it will visually appear but if it leaves into the fog, it will vanish and you will have to relocate your forces to that unit's last known location to keep it in your sights.
A second layer, known as a Shroud is a semi-permanent layer. This hides everything beneath. Once a unit moves into the shroud, it peels back, revealing the environment beneath. When the unit leaves, the Fog of War covers the area, where the Shroud once covered.
The great way to keep your forces of any incoming attack is to use Scouts, Observation Posts and patrols. This keeps your nation aware of their surroundings and patrols may be able to intercept any incoming raiders.
Bear in mind that this also applies to other human players. Keeping your forces out of your enemies' units' sights will ensure that you can sneak in undetected, unless the player has enabled powers that allows him to reveal the entire area.