The boundary conditions for the ideal MHD equations on a plane discontinuity surface are investigated. It is shown that, for a given mass flux through a discontinuity, its type depends only on the relation between inclination angles of a magnetic field. Moreover, the conservation laws on a surface of discontinuity allow changing a discontinuity type with gradual (continuous) changes in the conditions of plasma flow. Then there are the so-called transition solutions that satisfy simultaneously two types of discontinuities. We obtain all transition solutions on the basis of the complete system of boundary conditions for the MHD equations. We also found the expression describing a jump of internal energy of the plasma flowing through the discontinuity. Firstly, this allows constructing a generalized scheme of possible continuous transitions between MHD discontinuities. Secondly, it enables the examination of the dependence of plasma heating by plasma density and configuration of the magnetic field near the discontinuity surface, i.e., by the type of the MHD discontinuity. It is shown that the best conditions for heating are carried out in the vicinity of a reconnecting current layer near the areas of reverse currents. The result can be helpful in explaining the temperature distributions inside the active regions in the solar corona during flares observed by modern space observatories in soft and hard X-rays.