Recently, several new tools and techniques have been developed to allow for robust detection and prediction of planetary encounters and potential impacts by near-Earth asteroids (NEAs). We review the recent history of impact-prediction theory and cover the classical linear techniques for analyzing encounters, which consists of precise orbit determination and propagation followed by target-plane analysis. When the linear approximation is unreliable, there are various suitable approaches for detecting and analyzing very low-probability encounters dominated by strongly nonlinear dynamics. We also describe an analytic approach that can provide valuable insight into the mechanisms responsible for most encounters. This theory is the foundation of impact monitoring systems, including those currently operational and those being developed.