Stand Alone Arduino

I want to now, can I program my Arduino such that I can pull out my USB cable connection and power it separately, Can the earlier uploaded program still work.

After I program my Arduino pro mini. Can I erase the old program put in a new program?

ratnamsub:
I want to now, can I program my Arduino such that I can pull out my USB cable connection and power it separately, Can the earlier uploaded program still work.

Yes indeed.

ratnamsub:
After I program my Arduino pro mini. Can I erase the old program put in a new program?

Whenever you upload a program, it overwrites the previous one.

The arduino is simply support hardware around a microcontroller. When you put your code into it from your computer to test your program it is programmed into the internal flash, where it will stay lots of years or until you erase or reprogram it. Your code you are running is already in the internal Flash (Program Memory). To make it work stand alone the simplest thing after unpluging the USB cable is to plug an external power supply, I like 10 Volts at 2 Amps however 12 volt versions are a lot more prevalent. Be smart and do not power things from the Arduino but use an external power supply, just remember to connect all grounds only. Then simply power it up. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil