Most nanofabrication processes are a global process, such as the deposition of thin films, chemical etching, reactive ion etching, illumination. If one wants a structure, one can use (nano)lithography processes to obtain a film with local features (at the nanoscale) instead of a film with global features.
There are several methods of performing lithography. The most common method is to use a thin coat of resist on a sample. When exposing the resist to electron beams ("e-beam resists") or light ("photoresist" or "optical resist") it will change its structure such that part of it can be desolved in a developing chemical. Depending on the type of resist, it is either the exposed part that can be desolved (in the case of a positive resist) or the exposed part that stays on the sample (in the case of a negative resist). Thus, by locally exposing the resist, we are able to locally protect the substrate against deposition or etching processes.
The resist is often spincoated onto the substrate. The thickness is a function of rotation speed, and this relation is often called the spin-curve. Most resists have to be baked on a hot-plate or in an oven in order to go through a glass-transition. The temperature and time for the baking process depend on what type polymer is used in the resist. Typically, this information can be found in the datasheets. Check out the resist recipes, where a.o. rotation speed, temperature and time are tabulated for our common resists.
When locally exposing the resist to a specific dose of electrons or UV radiation, the resist will chemically change. For positive resists, this happens due to the process of chain-scission, where the skeletal bonds of the polymer-chains are broken, making it easy to desolve in a developing chemical. For negative resists, a different process occurs, namely cross-linking, where small polymer chains are linked to form a longer polymer that is harder to desolve with the developer chemical.
There are two main methods of exposing the resist locally: 1) direct writing (e.g. with a scanning beam), and 2) shadow mask lithography (where a shadow is cast such that some parts of the resist are not exposed; note that this does not exist for e-beam lithography). We will mainly discuss the former, since we have an e-beam lithography (EBL) system and an optical direct-write system. The trajectories of electrons can easily be manipulated with electromagnetic lenses such as the ones you find in an SEM. Manipulating the trajectories of photons has to be done with e.g. a matrix of MEMS-mirrors.
(Additionally to these two, you can use poor-mans lithography for 'quick-and-dirty' measurements such as deposition rate calibrations. The main difference is that, instead of locally exposing a resist, one locally draws with a permanent marker, which can later be desolved in acetone to do poor-man's lift-off.)
The amount of exposure depends on the sensitivity of the resists, and for EBL also on the substrate since incident electrons do not interact with the resist but the secondary electrons (coming from the substrate) do interact. So, for each resist, there is a specific dose, but beware that for EBL the dose will change depending on the substrate! It is always smart to perform a dose test when working with new substrates or resist/substrate combinations.
After patterning, one can develop the resist with the chemical developer, leaving the patterned resist on the sample. This now practically functions as an unsuspended mask through which one can perform deposition for a lift-off process, or an etching step if one had already deposited a thin film. Stripping the resist off after an etching process is relatively straightforward compared to the sometimes tedious procedures in lift-off recipes.