I'm working on a project and my dad hit the reset button on my Arduino board, unknowingly. If it wasn't connected to any power source or computer, did it still reset? Do I have to upload my code to the board again? Or does the board need power to be reset?
The reset on an Arduino does not erase anything. It merely restarts execution of an already uploaded program. Also the AVR needs to be powered on for it to realize whether it has been reset.
Every time you power on an Arduino it automatically starts code execution from the beginning of the program in the flash memory.
The reset sets the processor and peripheral registers in initial state. This means that the program counter register (which marks the actual command the processor is working on) will be set to zero so the program starts from the very beginning.
The program is located in the ROM/flash which can only be erased with a flasher tool (in your case when you connect it to your PC) so a reset will not affect the program at all.