This article discusses the problem of heat conductivity and filtration in heterogeneous media with periodical structures. It takes into account the possibility of convective heat transfer as well as conductive. The solution of the problem was obtained in the frames of the method of asymptotical averaging of differential equations with quickly oscillating coefficients. Asymptotic approximation is built with an accuracy of the second order of the small parameter. The problem is nonlinear; it takes into consideration temperature dependence of thermophysical and seepage characteristics of the medium. The derived equations describe the processes of heat conductivity, considering the conductive and convective mechanisms of heat transfer as well as possible phase transitions. An analytical solution was obtained for the problem of heat conductivity in semi-infinite layered medium. This solution takes into consideration the possibility of phase transitions, accompanying by subsequent seepage of produced liquid.