Because of the structure of DNA, when it replicates itself, it must replicate a separate strand for each of the original strands. This involves the DNA Polymerase, which is a reactive enzyme, building new strands of DNA using the existing strands as a template.
DNA is shaped like a spiraled ladder, with connective nucleotide bases between the two strands. When the DNA replicates, the strands separate and are left with their bases unconnected; the new strands need to match with the old ones to properly form. The bases are the key to this; by matching a corresponding base to the existing bases -- cytosine to guanine, thymine to adenine -- the polymerase is able to generate a strand that is functionally identical to the opposing strand that has been separated. However, the polymerase cannot create a DNA strand directly; instead it uses an existing RNA strand, which is then extended by the polymerase to create the new strand. When the DNA molecule has been fully separated and new strands formed, there will be two identical DNA molecules.