This work focuses on measuring diffusion with nuclear magnetic resonance (NMR). First part describes diffusion and restricted diffusion. Next, follow the basics of NMR and description of measurements. The elements of the measuring system with NMR are also described. Presented are measurements of bulk diffusion in isotropic sample as well as restricted diffusion in isotropic and anisotropic sample. From the measurements we can infer the microscopic structure of the sample, the orientation of oblong pores and their size.