Patterning with a focused ion beam (FIB) is an extremely versatile fabrication process that can be used to create microscale and nanoscale designs on the surface of practically any solid sample material. Based on the type of ion-sample interaction utilized, FIB-based manufacturing can be both subtractive and additive, even in the same processing step. Indeed, the capability of easily creating three-dimensional patterns and shaping objects by milling and deposition is probably the most recognized feature of ion beam lithography (IBL) and micromachining. However, there exist several other techniques, such as ion implantation- and ion damage-based patterning and surface functionalization types of processes that have emerged as valuable additions to the nanofabrication toolkit and that are less widely known. While fabrication throughput, in general, is arguably low due to the serial nature of the direct-writing process, speed is not necessarily a problem in these IBL applications that work with small ion doses. Here we provide a comprehensive review of ion beam lithography in general and a practical guide to the individual IBL techniques developed to date. Special attention is given to applications in nanofabrication.