The samger method uses a DNA polymerase to synthesize a new DNA strand using a template and a specific primer, in the presence of dideoxynucleotides that terminate the synthesis specifically following the addition of an A, C, G, or T. In the modern incarnation, each dideoxy nucleotide is attached to a fluorescecnt dye so all of the fragments ending in a given base fluoresce the same color. Separating the fluorescent bands allows one to read of the color of each fragment that differ from each other by one nucleotide, and thereby read off the sequence.
The Maxam-Gilbert method takes a DNA fragment that has been labeled at the 5'-end, usually with radioactive phosphorus, and subjects to chemical cleavage with reagents that cut at specific bases. By using a low concenrtation of the reagents, only one or two sites are cleaved on each molecule. The products produced by cleavage are separated by electrophoresis and the bands made with the different reagents are run side by side and compared. Since only fragments with the labeled 5'-end are visible, the size of the fragment says that a site sensitive to that reagent (a specific base) is located x nucleotides from the 5'-end, again allowing the seqience to be read off.