You must have a CNC control that supports a 4th axis, and a rotary table or native 4th axis that can be controlled by the CNC machine.
There are several ways to use the 4th axis:
Indexing — The 4th-axis is used as an indexer, to rotate the part between machining operations so that the machining takes place on different planes of the part.
Wrapping — The rotary table is used as a continuously moving axis. Rotation occurs during the machining operation and the tool movement is limited to either the X- or Y-axis and the Z-axis. The part itself is rotated to take the place of the axis not used. This feature is capable of wrapping any feature while the part is rotated.
4-axis simultaneous — Another method of using the rotary table's rotational axis is to use all four degrees of freedom at once with 4-axis simultaneous. This enables you to directly machine surfaces without the need for unwrapping and may result in the machine moving in X, Y, Z, and A (for instance) all at once.