In this chapter we describe the fundamentals of X-ray optics with a particular emphasis on refractive and diffractive optics for high-resolution X-ray microscopy. To understand the physical limitations of X-ray microscopy and X-ray optics, a wave-optical treatment of the interaction of X-rays with the optical elements is needed. As all optics exploit elastic X-ray scattering in the form of refraction, reflection, or diffraction, these phenomena are reviewed, modeling matter by its complex index of refraction. The smallest probe sizes are reached at the diffraction limit. In that case, the focal spot size depends only on the numerical aperture of the optical element at a given wavelength. We discuss refractive and diffractive optics in view of optimal numerical aperture and give a few application examples in full-field and scanning microscopy.