The efficiency of nonlinear interaction processes in lithium niobate (LN) can be significantly enhanced by a confinement of the optical fields to waveguide or resonator modes. The functionalities of the optical elements strongly depend on their specific layout and can be implemented only with a sophisticated microstructure technology. This thesis, therefore, contributes to the advancement and development of existing patterning approaches and their application to the realization of microstructured waveguides and resonators. Especially the full potential of ion beam enhanced etching (IBEE) of LN is explored by the realization of advanced structures such as photonic crystals. Furthermore, a modified IBEE process which is based on KOH instead of HF is established after studying the etching behavior of ion beam irradiated LN in different hydroxide solutions for a broad range of experimental conditions. Substituting HF by KOH makes thin film LN substrates fully compatible with IBEE because KOH does not etch the intermediate silicon dioxide layer. IBEE is used in combination with electron beam lithography for large area patterning. In particular, it is used for the realization of nanoscale ridge waveguides and photonic crystal waveguides that are sufficiently long for the observation of propagation effects with a scanning near field optical microscope. In addition to IBEE, direct patterning of photonic structures by focused ion beam (FIB) is suitable for prototyping of small areas. The impact of gallium ion contaminations from the FIB milling, which remain in the substrate and impair the dimensional accuracy, is investigated. FIB patterning is eventually used to realize microdisk and photonic crystal resonators. Their linear and nonlinear optical characterization is presented, particularly the resonantly enhanced second harmonic generation from a photonic crystal resonator.