The DNA is replicated during the S phase of interphase in order to prepare the cell for nuclear (mitosis) and cellular (cytokinesis) division. In order for DNA polymerase (an enzyme) to copy the nuclear DNA, the DNA must be in a non-condensed form known as chromatin. Chromatin is a "stringy" form of DNA that is typical when cells are not actively proceeding through mitosis. The DNA in this form is wrapped around tiny proteins called histones, but is not condensed into chromosomes as it is during mitosis. Instead, it can be easily stretched out giving DNA polymerase access to the bases so that they can be read and a complimentary strand can be produced.
During mitosis, however, the nuclear envelope that encloses the DNA and protects it disappears. This would put chromatin DNA at risk for damage. In order to protect itself from damage, the DNA coils tightly around histones and condenses into chromosomes. When looking at stained cells under a microscope, one can tell if cells are actively mitotic. Chromosomes are only visible in cells undergoing mitosis. Chromatin is very thin and is not visible in the nuclei of cells in interphase.