I've worked in DNA sequencing labs for over 10 years. Here is a basic run down of how it works:
1) Perform polymerase chain reaction (pcr) on the section of DNA you want to sequence to provide many copies of the genes.
For more info on pcr check this site: https://www.dnalc.org/view/15475-The-cycles-of-the-polymerase-chain-reaction-PCR-3D-animation.html
2) Once you have many copies of the gene, a cycle sequencing reaction is performed. This reaction labels DNA strands with florescent tags corresponding to the DNA bases.
More info on Cycle Sequencing (aka Sanger Sequencing) https://www.dnalc.org/view/15923-Cycle-sequencing.html
3) The Products of the sequencing reaction are separated on a gel based on size, and a laser is used to read the florescent tag on each fragment.
4) A computer program translates the data into a text sequence of the gene.
The links are really helpful in understanding the reactions - check them out.