Chip Design Computer Generated Files for Fabrication Process
Chip making is a process of lithography, i.e printing.

To do this you use masks, which are used to project patterns into Photo-Resist (PR) on the wafer.  Sometimes the mask is used to block things, sometimes the mask is used to pattern a layer underneath that is more resilient to the process (a Hard mask). PR can be used in etching or implanting, and many other steps.

You start with a design in which you've laid out the transistors, you will have Well implants, Isolation structures (SONOS, STI), poly-silicon masks (for the gate, note I've just skipped over between 2 - 7 masks depending upon the the process). BEOL (Back End Of Line) masks for metal interconnects etc. and so on and so on.

The layout database is in a data format called GSDII or Oasis.  This data is then subjected to a "fracture" process that generates MEBES data which is the data that is sent to the mask shop for generation of the masks used in lithography. In fracture, various things are done, like scaling, and correction for interference effects etc.

Once the data is fractured the designer is asked to verify that the fractured data still corresponds to the actual designed files. It rarely is different.  The masks are made, and are typically chrome plating on Quartz.  These masks are then checked for perfect fidelity. If they don't match they are then fixed or redone.

These masks are then sent to the fabrication factory and are loaded in the mask storage or the cassette storage which is adjacent to the lithography tool. This has to be kept clean, clean ... clean as even a single spot will replicate on every die produced.

I've glossed over so much here, the details fill shelves of space.

To answer your question about replacement. Yes, you can replace masks in the fab.  Indeed, on the first runs through you typically put "stops" at different parts of the process, you start with say 12 wafers, stop 3 at well implant, 3 at poly, 3 at contact and three go all the way through.  You test the last three, find a problem, change a mask and then restart the wafers that were stopped earlier.

see this for a little more detail.