Can you use an Arduino Uno as an ATmega328 programmer?
Yes, the Arduino can be used as an AVR programmer.
But, no, you can't just plug the new chip in.

The AVR microcontroller in the Arduino contains the Arduino bootloader. This bootloader can only update the sketch code.

In order to use a brand new AVR with your Arduino, you'll need to copy the Arduino bootloader to it using an AVR In-System-Programmer (ISP).

Fortunately, the Arduino Uno can be used as an AVR ISP.

http://arduino.cc/en/Tutorial/ArduinoISP