A method is developed for solving nonlinear systems of differential, or integrodifferential, equations with stochastic fields. The method makes it possible to give an accurate solution for an interesting physical problem: What are the peculiarities of nonlinear spin dynamics in nonequilibrium nuclear magnets coupled with a resonator? Evolution equations for nuclear spins are derived basing on a Hamiltonian with dipole interactions. The ensemble of spins is coupled with a resonator electric circuit. Seven types of main relaxation regimes are found: free induction, collective induction, free relaxation, collective relaxation, weak superradiance, pure superradiance, and triggered superradiance. The initial motion of spins can be originated by two reasons, either by an imposed initial coherence or by local spin fluctuations due to nonsecular dipole interactions. The relaxation regimes caused by the second reason cannot be described by the Bloch equations. Numerical estimates show good agreement with experiment.