Here we describe the design and performance of the Spider instrument. Spider is a balloon-borne cosmic microwave background polarization imager that will map part of the sky at 90, 145, and 280 GHz with sub-degree resolution and high sensitivity. This paper discusses the general design principles of the instrument inserts, mechanical structures, optics, focal plane architecture, thermal architecture, and magnetic shielding of the TES sensors and SQUID multiplexer. We also describe the optical, noise, and magnetic shielding performance of the 145 GHz prototype instrument insert.