A sequencing reaction includes four main ingredients. "Template" DNA copied by the bacteria; free bases, the building blocks of DNA that come in 4 types; short pieces of DNA - called "primers"; and DNA polymerase, the enzyme that copies DNA.
The chemical reaction that makes DNA in a test tube is very similar to what happens in a living cell: both rely on DNA polymerase, and in both cases, DNA strands have a head end, which scientists call the 5' end, and a tail end, called the 3' end. A DNA strand can grow only from its 3' end.
Making DNA in cells and sequencing DNA in test tubes depend on one central property of DNA: The building blocks on opposite strands of DNA pair specifically - a C always pairs with a G, an A always pairs with a T.
The primer alights on the segment of DNA that matches it.
Free bases that match the template sequence can attach to the new strand's growing (3') end.
Among all the free bases swimming in the solution, a few have an extra chemical part. The chemical is a fluorescent dye. When the colored bases attach to the growing strand, the extra chemical part keeps the new DNA strand from growing any further. A different colored dye is attached to each of the four kinds of bases.
Human Genome Research Institute