A method describing NMR-signal formation in inhomogeneous tissue is presented which covers all diffusion regimes. For this purpose, the frequency distribution inside the voxel is described. Generalizing the results of the well-known static dephasing regime, we derive a formalism to describe the frequency distribution that is valid over the whole dynamic range. The expressions obtained are in agreement with the results obtained from Kubos line-shape theory. To examine the diffusion effects, we utilize a strong collision approximation, which replaces the original diffusion process by a simpler stochastic dynamics. We provide a generally valid relation between the frequency distribution and the local Larmor frequency inside the voxel. To demonstrate the formalism we give analytical expressions for the frequency distribution and the free induction decay in the case of cylindrical and spherical magnetic inhomogeneities. For experimental verification, we performed measurements using a single-voxel spectroscopy method. The data obtained for the frequency distribution, as well as the magnetization decay, are in good agreement with the analytic results, although experiments were limited by magnetic field gradients caused by an imperfect shim and low signal-to-noise ratio.