Images of a nearby celestial body collected by a camera on an exploration spacecraft contain a wealth of actionable information. This work considers how the apparent location of the observed body's horizon in a digital image may be used to infer the relative position, attitude, or both. When the celestial body is a sphere, spheroid, or ellipsoid (as is the case for most large bodies in the Solar System), the projected horizon in an image is a conic-usually an ellipse at large distances and a hyperbola at small distances. This work develops non-iterative and analytically exact methods for every case (all combinations of unknown state parameters and quadric shapes), completely superseding older horizon-based methods that are iterative, approximate, or both. Some of the analytic methods presented in this work are new. Recognizing that these developments build on techniques that may be unfamiliar to many spacecraft navigators, this work is fashioned as a tutorial. Descriptive illustrations and numerical examples are provided to make concepts clear and to validate the proposed algorithms.