Master Mold was a program designed by Bolivar Trask to fabricate and coordinate the Sentinels. It enabled the Sentinels to learn and combat mutants. The X-Men managed to destroy its terminals but the program simply escaped into a damaged Sentinel body.
In the future, Master Mold somehow caused the Sentinels to dominate the world, hunt down and imprison mutants and turned Earth into a dystopian wasteland. Humans, such as Colonel Moss, were made into cyborgs and assigned as wardens of the detainment camps. The purpose of holding mutants was to replicate their powers. The capture of Xavier, along with a reverse-engineered Cerebro, allowed Master Mold to determine the locations of every remaining mutant. The future X-Men led by Charles Xavier led a full out assault on the compound before the world's mutants could be attacked. They were successful only due to the timely intervention of Polaris who used her powers to destroy all the Sentinels and Master Mold. However, the X-Men of the present managed to prevent this terrible future from ever happening with only Xavier seeming to retain knowledge of its events.