I have many questions concerning this topic. I know that temperature measures the tendency of an object to give up its internal energy. The transit of internal energy is called heat. I don't know if my statement is right or wrong, but temperature is related to the internal energy of an object (vibrational, translational, rotational etc..), higher the temperature, higher its internal energy. But this case is not applicable when there's a phase change, because it happens at constant temperature as the internal energy changes. As I know, if the temperature is constant, the internal energy of the object should be constant (equipartition theory). Please can somebody clarify to me where is the flaw in my reasoning?
The equipartition theorem is not a general result. It applies to systems which can be completely described by some number of quadratic degrees of freedom, in other words the energy of each particle can be written as $$ E = \sum_i^N C_i x_i^2 $$ where the $C_i$ are constants and the $x_i$ are independent variables, such as say the velocity or position of the particle. $N$ then gives then number of degrees of freedom.
If the energy does not have this form, then the equipartition theorem does not apply and the heat capacity no longer has to be independent of temperature.
I believe that for some, relatively simple, solids the equipartition theorem actually gives a reasonable result and monatomic gasses are often pretty close to a ideal gas, however in most real world the equipartition of energy is a crude approximation at best. Liquids, in particular, I would not expect to be well described at all.