The highly conserved AAA ATPase Cdc48/p97 acts on ubiquitylated substrate proteins in cellular processes as diverse as the fusion of homotypic membranes and the degradation of misfolded proteins. The 'Ubiquitin regulatory X' (UBX) domain-containing proteins constitute the so far largest family of Cdc48/p97 cofactors. UBX proteins are involved in substrate recruitment to Cdc48/p97 and in the temporal and spatial regulation of its activity. In combination with UBX-like proteins and other cofactors, they can assemble into a large variety of Cdc48/p97-cofactor complexes possessing distinct cellular functions. This review gives an overview of the different subfamilies of UBX proteins and their functions, and discusses general principles of Cdc48/p97 regulation by these cofactors.