Many MSBuild tasks shipped by Microsoft, uses IncrementallBuild or Filetracker in order to track which files were used to produce outputs of given file. Knowing relation between inputs and outputs MSBuild can create dependency graph.
By comparing timestamp of output file and all input files can eliminate execution on many tasks. If timestamps of all input files for given output file are "lower/before" than output file, it means none input file were modified, MSBuild can skip execution of this task.
I case of VC++ project this information is logged into *.tlog files (stored in IntermediateDirectory $(IntDir) of project). By execution of target Rebuild you can skip using IncrementalBuild feature it because rebeuild means clean and build (so tlog files are deleted).