We perform ab initio molecular-dynamics simulations of CdTe at three different temperatures: 800 K (supercooled state), 1370 K (near the melting temperature), and 3000 K (superheated state). In agreement with experiment, we find that upon the melting, CdTe experiences a semiconductor → semiconductor transition. In its liquid state, CdTe retains its tetrahedral environment with the coordination number ∼4. We find that heating CdTe much above its melting point leads to substantial structural changes with a transformation to a more close-packed atomic structure. The coordination number of the superheated phase is ∼6 and the dc electrical conductivity is an order of magnitude larger than at the melting temperature. This, along with the disappearance of the finite band gap, suggests a gradual semiconductor → metal transition in the CdTe system at a temperature higher than melting point. We also find in liquid CdTe, near the melting temperature, atoms of Te form infinite branched chains. Short and simplified chains are still present in the supercooled phase. As the temperature increases, chains break, become shorter, and, eventually, transform to form close-packed clusters in the supeheated state. We also examine dynamical and electronic properties of the CdTe system.