On a cnc machine, with the spindle Z axis above the table, you would generally not have an extra axis facing upwards towards the spindle, because the controller is able to mimic rotary action by what we call circular interpolation of X and Y axis. There are special gcodes (G02, G03) for this common operation for interpolation of arcs. So your linear moves are made in X and/or Y linear interpolation mode, called G01 and arcs are made by the G02 and G03 (CW or CCW arc).
So a 4th axis would typically be set with its rotational axis at right angles to the spindle Z axis. By means of rotation of the part mounted on the 4th axis, you are then able to bring other surfaces of the part into the "visibility of the spindle".
A simple example would be drilling two cross holes in a shaft, at right angles to each other and to the axis of the shaft. This operation is impossible to do with a single spindle and a single clamping of the workpiece. But the 4th axis makes this easy to do, plus increases the accuracy of the relationship between the two holes, because the part maintains a perfectly well defined location, because it does not have to be unclamped from the 4th axis chuck.
First you get good, then you get fast. Then grouchiness sets in.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)