Once the shutdown is done properly, all file systems are unmounted (umounted, in fact). The root file system is placed in read-only mode. For each file system including the root, a clean flag is set. This flag is checked for each file system at next boot to decide if it needs a thorough check before completing the boot process. This insures that at least the structure of the file systems is usable after a hard crash (power failure for one). It does not protect from data loss, however; a clean shutdown is always a good thing.