A rotary union or swivel joint.
There a couple cross-sectional views on this page - http://www.filtonltd.co.uk/products_swivel.php


Basic ones only use two o-rings with glide rings, while more complex/higher duty ones will use ball bearings with lip seals. It all depends on speed/pressure/type of fluid.