Arduino Power Input Default

I am trying to make a device that can be powered by a 9V battery. Because I don’t want the battery to be drained constantly, I want the device to be able to be plugged in as an option.

I also do not want the arduino to turn off as it will be running a timer. The main purpose of the device is to be an hourly timer.

If I plug the Ardiuno Uno in via usb, will it ignore the 9V, and not drain the battery? Is there a simple way to keep the arduino on while switching power sources?

The Arduino will ignore the USB power when the battery is connected - certainly not what you want to do.

Which Arduino do you plan to use? Most boards have active components which draw current even in sleep mode - see the power saving turorials. A 9V battery can be drained within a few hours, you better use a different battery of higher capacity and lower voltage. Longest lifetime can be accomplished with an added real time clock, which can wake up the Arduino even from deep sleep (with least power consumption). Otherwise the active oscillator (for the timer) will draw current even in sleep mode.