The ultrahigh vacuum (UHV) scanning tunneling microscope (STM) enables patterning and characterization of the physical, chemical, and electronic properties of nanostructures on surfaces with atomic precision. On hydrogen-passivated Si(100) surfaces, selective nanopatterning with the STM probe allows the creation of atomic-scale templates of dangling bonds surrounded by a robust hydrogen resist. Feedback-controlled lithography, which can remove a single hydrogen atom from the Si(100):H surface, demonstrates high-resolution nanopatterning. The resulting patterns can be used as templates for a variety of materials to form hybrid silicon nanostructures while maintaining a pristine background resist. The versatility of this UHV-STM nanolithography approach has led to its use on a variety of other substrates, including alternative hydrogen-passivated semiconductor surfaces, molecular resists, and native oxide resists. This review discusses the mechanisms of STM-induced hydrogen desorption, the postpatterning deposition of molecules and materials, and the implications for nanoscale device fabrication.