Nanophotonics—the science and technology of confining, guiding, and making photons interact with matter at the nanoscale—is an active research field. By varying the geometry and constituent materials, nanostructures allow precise control of the scattering of incident light and tailoring of emitted light. In this Tutorial, we outline the use of the Maxwell equations to model the optical response of nanostructures. This electromagnetic optics approach uses the refractive indices of the constituent materials and the geometry of the nanostructures as input. For most nanostructure geometries, analytical solutions to the Maxwell equations are not available. Therefore, we discuss varying computational methods for solving the equations numerically. These methods allow us to simulate the optical response of nanostructures, as needed for design optimization and analysis of characterization results.