A second-order nonlinear differential equation with an aftereffect, for the density of a thin homogeneous layer on a liquid and vapor interface is considered. The acts of evaporation and condensation of molecules, which are regarded as periodic "impacts", excite the layer. The mentioned NDE is integrated over a finite time interval to find a 2D (two-dimensional) mapping whose numerical solution describes the chaotic dynamics of density and pressure in time. The algorithms of constructing, bifurcation diagrams, Lyapunov's exponents and Kohnogorov's entropy for systems with first-order, second-order phase transitions and Van der Waals' systems were elaborated. This approach allows to associate such concepts as phase transition, deterministic chaos and nonlinear processes. It also allows to answer a question whether deterministic chaos occurs in systems with phase transitions and how fast. the information about starting conditions is lost within them.