Confused about using Arduino IDE with stand alone ATMega328

After having a working circuit using an Arduino UNO, I am now having trouble getting it to work on a printed circuit board with a stand alone ATMega 328. Thankfully I can communicate with the ATMega by uploading to it using the Arduino IDE and am able to utilize the serial monitor. I think my screw up is in that I am assigning pins in the IDE as if they are actually the pins on the ATMega 328, e.g., pinMode(6,INPUT) is meant to assign pin 6 of the ATMega 328 as an input pin. I'm now suspicious that there has to be some translation between pins used in the IDE and actual pins on the ATMega 328, i.e, Pin 6 in the IDE translates to pin12 on the ATMega 328. Can someone straighten me out on this? Thanks - Scotty

There is a mapping from physical pins to software names for the pins.

Ah, thank You, Sir. - Scotty