The sequence of events post processor reset would be :
1)All the hardware peripherals are put to a known state. This is dependent on the processor/microcontroller & the documentation of that part needs to be examined to know this state;
2)The processor then vectors to a known location ( documented ) & starts executing binary code at that location;
3)If an OS is in place, then we typically have the boot loader at that location, which puts the system in a known state & then jumps to the OS code;
4)Or if no OS is present then the start-up code runs ( in assembly language & typically provided by the compiler ) & this code, after carrying out some initialization, jumps to the main function of the C code - this where the programmer's world begins.