The crystal structure of Na0.5CoO2, determined by powder neutron diffraction, is reported. The structure consists of layers of edge-shared CoO6 octahedra in a triangular lattice, with Na ions occupying ordered positions in the interleaving planes. The Na ions form one-dimensional zigzag chains. Two types of Co ions, which differ only subtly in their coordination by oxygen, are also found in chains. Specific heat measurements show that the transitions observed at 87 K and 53 K in the resistivity and magnetic susceptibility are accompanied by changes in entropy. Electron diffraction studies suggest that the 87K transition may have a structural component.