A comprehensive theoretical description is given for the spin relaxation and diffusion in solids. The formulation is made in a general statistical-mechanical way. The method of the nonequilibrium statistical operator (NSO) developed by Zubarev is employed to analyze a relaxation dynamics of a spin subsystem. Perturbation of this subsystem in solids may produce a nonequilibrium state which is then relaxed to an equilibrium state due to the interaction between the particles or with a thermal bath (lattice). The generalized kinetic equations were derived previously for a system weakly coupled to a thermal bath to elucidate the nature of transport and relaxation processes. In this paper, these results are used to describe the relaxation and diffusion of nuclear spins in solids. The aim is to formulate a successive and coherent microscopic description of the nuclear magnetic relaxation and diffusion in solids. The nuclear spin-lattice relaxation is considered and the Gorter relation is derived. As an example, a theory of spin diffusion of the nuclear magnetic moment in dilute alloys (like Cu-Mn) is developed.It is shown that due to the dipolar interaction between host nuclear spins and impurity spins, a nonuniform distribution in the host nuclear spin system will occur and consequently the macroscopic relaxation time will be strongly determined by the spin diffusion. The explicit expressions for the relaxation time in certain physically relevant cases are given.