This article explains some fundamental ideas concerning the optimal control of quantum systems through the study of a relatively simple two-level system coupled to optical fields. The model for this system includes both continuous and impulsive dynamics. Topics covered include open- and closed-loop control, impulsive control, open-loop optimal control, quantum filtering, and measurement feedback optimal control.