One of several solutions is the use of O-ring seals. A seal does not need to be perfect gas-tight. As long as the leak rate of the suit is small compared to the oxygen consumption of the astronaut it is ok.

There are lubricated O-ring seals between the moving parts. The elastic O-ring is seated in a precisely machined grove and slightly compressed during assembley. There should be no nicks, burrs, or scratches at the metal surfaces over which the O-Ring moves. The gap between stationary and rotating parts is filled by the O-ring. The gas pressure should move the O-ring closer to the gap. 

See the images at the bottom of page 6 and 9 of this [O-ring handbook](https://www.physics.harvard.edu/uploads/files/machineshop/epm_oring_handbook.pdf) PDF.

The EMU Maintenance Kit for the Apollo Suits contains a tool for O-ring removal and pads for lubrication:

[![enter image description here][1]][1]

From the Apollo Operations Handbook [EMU](https://www.hq.nasa.gov/alsj/alsj-EMU1.pdf).

But there is no information about O-rings used for rotating joints.


  [1]: https://i.sstatic.net/GrpLV.png