A proper cam program, depending on the post processor of course, will define the 4th axis as "A". So you have X, Y, Z, & A, and of course B, C if you have 6 axes.

Now the movement in "A" may be in mm or in degrees depending on your machine settings. There is a tick box in mach3 for that.