Rigid particles pack into structures, such as sand dunes on the beach, whose overall stability is determined by the average number of contacts between particles. However, when packing spatially extended objects with flexible shapes, additional concepts must be invoked to understand the stability of the resulting structure. Here, we examine the disordered packing of chains constructed out of flexibly connected hard spheres. Using x-ray tomography, we find that long chains pack into a low-density structure whose mechanical rigidity is mainly provided by the backbone. On compaction, randomly oriented, semi-rigid loops form along the chain, and the packing of chains can be understood as the jamming of these elements. Finally, we uncover close similarities between the packing of chains and the glass transition in polymers.