The atomic density function kinetic theory of a spontaneous atomic rearrangement at the atomic scale is developed. In this theory, the evolution of the system is described not by the individual movement of each atom in the same system but by the evolution of the atomic density functions, which are averages over the time-dependent ensemble. The temporal evolution of atomic densities is driven by the free energy relaxation. The thermodynamic aspects of the instability of the homogeneous liquid state and the formation of crystalline and amorphous state are discussed. Examples of self-assembling of atoms in the formation of a three-dimensional nanocrystal, and the two-dimensional diffusionless transformation in the crystalline and amorphous states are considered. The modeling reveals the special features of displacive phase transformations in the crystalline state through a transient stress-accommodating state. It also demonstrates that the thermodynamic relaxation of the liquid below its critical instability point produces a relaxed amorphous state that is practically a metastable phase.