You may also have a bad bootloader (although this is very rare) and need to reinstall the bootloader. If you are building your own Arduino, or need to replace the IC, you will need to install the bootloader. Once it locates and runs your program, the Arduino continuously loops through the program and does so as long as the board has power. If the computer isn't trying to upload code, it tells the chip to run the code that's already stored in memory. This basically turns the IC off and back on again so the bootloader can start running again. That is why when you try to upload code, the Arduino IDE resets the chip. If it is, it grabs the program from the computer and uploads it into the ICs memory (in a specific location so as not to overwrite the bootloader).
First, it looks around to see if the computer is trying to program it. It is very similar to the BIOS that runs on your PC. hex file that runs when you turn on the board.
hex file on their AVR chips that allows you to program the board over the serial port, meaning all you need to program your Arduino is a USB cable. The Arduino has largely done away with these issues. hex files, and its not very beginner friendly. You need a special programmer and some fancy. Atmel AVRs are great little ICs, but they can be a bit tricky to program.