Aerobraking

Discuss the technique of aerobraking as it applies to interplanetary space missions. How does it work, why is it used, and describe at least two examples where the concept has been applied?