Basic Computer Numerical Control (CNC) milling machines have at least 3 axes; the X axis, the Y axis, and the Z axis. Assuming that you are not milling four-dimensional objects, this should cover most of your basic machine parts.
4-axis and 5-axis machines are not doing anything mathematically interesting; they are just moving along the three traditional axes, and also rotating the milling head (or, sometimes, the table, which has the same effect). Moving the spindle along three axes allows for curves and angles, but it does not allow for cuts that are not parallel with the workpiece; if you want to cut not across the piece at an angle, but into the piece at an angle, you will need at least one more axis of motion.
Rotation of the spindle, and thus the cutting tool, around the X-axis is called the A-axis, rotation around the Y-axis is called the B-axis, and rotation around the Z-axis is called the C-axis. A 4-axis CNC machine can be set to accommodate any one of these three additional axes, and a 5-axis machine any two.
There are two basic types of 5-axis machining. 3+2-axis machining is the cheap(er) way, and may be what you have in your head when you picture the table rotating to present the piece at different angles to the cutting head; the spindle (or the table) does move, but the machine cannot keep the cutting tool perpendicular to the workpiece when making rotated cuts. This limits the types of cutting you can do, often results in worse finishing, and may cause more wear and tear on your cutting tool. A true 5-axis machine will be able to keep the spindle perpendicular to workpiece throughout all rotations.
You may be wondering about the missing axis; if there are A, B, and C axes, why not just get a 6-axis machine? Well, you can, but these are generally either small and limited in use, or giant robot arms akin to what you are used to seeing in automobile manufacturing. In the case of general, all-around milling for those machinists not running a multi-million dollar facility, 4- and 5- axis machines are a sweet spot of practicality and affordability... although, quite frankly, it is neither practical nor affordable for most people to have a milling machine in their garage.