There are many types of phase diagram. The phase diagram for a single substance is usually called a pressure-temperature phase diagram. It shows the regions of P-T space for which the substance is solid, liquid or vapor. Moreover, it defines the coexistence curves, which show where phase transitions take place. A phase diagram can be determined based on the knowledge of a basic thermodynamic data such as the density of the solid and liquid, the enthalpy of melting and vaporization, the triple point and the critical point. The last two points in the P-T pahse diagram cannot be predicted from first principles , but are usually known from measurements made on the various phases.
The video below discusses the significance of degrees of freedom on a phase diagram. The total degrees of freedom of a system can involve the number of components (greater than one) and the temperature and pressure. If there is only one component then the system can have at most two degrees of freedom, T and P. However, we show that there can be fewer than that along the phase boundary where T implies a pressure P. In the videos on the right we show the equations that connect T and P along the phase boundary. At the triplet point and critical point there are no degrees of freedom. These are unique points in phase space.