The Deconfinement Phase Transition In Neutron Stars And Proto-Neutron Stars