There is a lot to cover when explaining auto focus, so it will take 2 installments to cover it all.
Auto Focus From The Beginning
The first auto focus SLR for general sale was released in 1978. That camera, the Polaroid SX-70 Sonar OneStep, used an active auto focusing system that sent out sound waves. Today's digital SLR's use a passive system that takes advantage of light coming in through the lens.
So, auto focus sure isn't anything new, having been around for 30+ years now.
How Does My Digital SLR Auto Focus?
It’s called SIR TTL passive phase detection - (Secondary Image Registration - SIR, Through The Lens - TTL).
It’s a pretty simple system actually. It’s used by most dSLR cameras today for that reason.
|Wikipedia - GNU Free Documentation License|
Here is how it works:
Light enters the lens and is reflected by the main mirror, but the main mirror (1.) is only 50% reflective.
Half of the light goes up through the pentaprism/pentamirror (4.) and to the viewfinder eyepiece (5.).