On a vertical machining centre:
A 4th axis can also be a rotational move of the machining spindle instead of the rotary table as a 4th + 5th axis can also be rotational moves of the machining spindle . . .
. . . instead of the rotary table.
All these can also be on a horizontal machining centre where the Z-axis moves horizontally instead of up - down (and the Y-axis moves up - down instead of horizontally).