The objective of the study is to build a simple yet informative mathematical model that describes the heat conduction in a spherical multi-layer body with phase transformation in the layers. The numerical scheme based on the theory of Markov chains is proposed to solve this problem numerically. The radial sector of the body is divided into finite number of spherical perfectly mixed cells of different volume, which form a chain of cells. The heat exchange between the cells is described with the heat conduction matrix, the entries of which depend on the local thermo-physical properties of material in the cells (heat conduction coefficient, density, specific heat capacity). These properties can vary from one cell to another and with time. The outer cell of the chain can exchange with heat with outside environment, the temperature of which can vary with time. The state of the process is observed in discrete moments of time separated by small but finite transition duration. If the temperature of a cell reaches the value, the phase transformation begins at which, the evolution of the cell thermal and phase state is described with the corresponding kinetic equation of the phase transformation. The process of melting and solidification is used as the example to verify the qualitative predictability of the model. The graphs of temperature distribution evolution and diagrams of phase content distribution in a multi-layer spherical body are presented. The obtained results on the evolution of the thermal and phase state of the ball have no contradiction to the physical sense of the process. The proposed algorithm has very low computational time (1-3 min for one regime). The other processes of the phase transformation can be easily implemented in the model, for instance, drying, exothermic and endothermic chemical reactions, etc.