Phase-change materials experience unusually large changes in material properties between amorphous and crystalline phases allowing them to be used as a form of memory. In this paper, we directly measure the local structure of the amorphous and crystalline phases using x-ray absorption spectroscopy. We demonstrate that the prototypical phase-change alloy Ge2Sb2Te5, the material of choice in optical and electrical phase-change memory, does not possess the rocksalt structure but likely consists of well-defined rigid building blocks that are randomly oriented in space consistent with cubic symmetry. Amorphization leads to a drastic shortening of covalent bonds and a decrease in the mean-square relative displacement, demonstrating a substantial increase in the degree of short-range ordering, in sharp contrast to the amorphization of typical covalently bonded solids.