Take a look at this page:
http://www.arduino.cc/playground/Learning/PortManipulationThe 328 has the same pins.
The innermost set of names are short for either PINx (in) or PORTx (out). The digit is the pin number on that port. So, PB5 is the 5th pin on PORTB or PINB, depending on whether the pin is used for input or output.
The text in red then identifies how the Arduino refers to the same pin. PB5 is digital pin 13.
Your stepper motor controllers should be connected to PORTD (output), which is digital pins 0 to 7. The step pins should then be digital pins 2, 3, and 4. The direction pins are pins 5, 6, and 7.
If you have limit switches, they are connected to PINB (input), which is the rest of the digital pins (8 to 13). The limit switches connect to pins 8, 9, and 10.
Pins 11 and 12 are used for the spindle enable and spindle direction pins.