We have studied both theoretically and experimentally flux-creep dynamics in superconductors. A theoretical analysis of nonlinear flux diffusion shows that the relaxation of the electric field proves to be similar for different models of thermally activated flux creep, whereas the long-time decay of the magnetic moment M(t) can be essentially model dependent. A proposed scaling analysis indicates that the short-time decay of M(t) in the subcritical region j${\mathit{j}}_{\mathit{c}}$ is universal and consists of two stages. The initial nonlogarithmic stage is due to a transient redistribution of magnetic flux over the sample cross section, the duration of this stage ${\mathrm{\ensuremath{\tau}}}_{0}$ being entirely determined by macroscopic quantities, such as sample sizes, flux creep rate ${\mathit{M}}_{1}$(T,B)=dM/d lnt, and magnetic ramp rate B${\mathrm{\ifmmode \dot{}\else \.{}\fi{}}}_{\mathit{e}}$=dB/dt. The second stage corresponds to the approximately logarithmic relaxation M(t)=${\mathit{M}}_{\mathit{c}}$-${\mathit{M}}_{1}$ln(t/${\mathit{t}}_{0}$), with ${\mathit{t}}_{0}$ being a macroscopic time constant that also depends on sample sizes, ${\mathit{M}}_{1}$(T,B), and the voltage criterion ${\mathit{E}}_{\mathit{c}}$ at which the critical current density ${\mathit{j}}_{\mathit{c}}$ is defined.We consider different models of flux dynamics with nonlinear flux-creep-activation barriers U(j) and obtain explicit formulas for ${\mathrm{\ensuremath{\tau}}}_{0}$ and ${\mathit{t}}_{0}$ for the exponential V-I curve and the vortex-glass model. We have also performed an experimental study of magnetic relaxation in grain-oriented ${\mathrm{YBa}}_{2}$${\mathrm{Cu}}_{3}$${\mathrm{O}}_{7}$ in which the time constant ${\mathrm{\ensuremath{\tau}}}_{0}$ has been measured directly at different temperatures 4.2 KT88 K, magnetic fields 0B8 T, and ramp rates 5 \ensuremath{\mu}T/sB${\mathrm{\ifmmode \dot{}\else \.{}\fi{}}}_{\mathit{e}}$10 mT/s. We have observed the inverse dependence of ${\mathrm{\ensuremath{\tau}}}_{0}$ upon B${\mathrm{\ifmmode \dot{}\else \.{}\fi{}}}_{\mathit{e}}$, with ${\mathrm{\ensuremath{\tau}}}_{0}$ ranging from 1 s to ${10}^{3}$ s and reaching 5000 s at B${\mathrm{\ifmmode \dot{}\else \.{}\fi{}}}_{\mathit{e}}$=5 \ensuremath{\mu}T/s, B=6 T, and T=20 K. It is shown that, in accordance with our model, the dependences of ${\mathrm{\ensuremath{\tau}}}_{0}$ upon T and B coincide with those for the flux-creep rate ${\mathit{M}}_{1}$(T,B)=dM/d lnt measured on the logarithmic stage of the flux creep. We have also measured the dependences of the initial magnetic moment M(0) on T, B, and B${\mathrm{\ifmmode \dot{}\else \.{}\fi{}}}_{\mathit{e}}$. Manifestations of the obtained results in magnetic and relaxation measurements on high-${\mathit{T}}_{\mathit{c}}$ superconductors are discussed.