Before your code
Plug in the Uno, or press reset, and the chip starts at its reset address. On the Uno that is a tiny program called a bootloader, kept at the end of flash: it runs first, then jumps to your code at the start of flash.
Before any of your functions run, startup code gets memory ready. Global variables, declared outside every function, get their first values: count = 0 is written into SRAM. A global stays there for the whole run.
Every C++ program starts in a function called main(). Your sketch has none: the Arduino core supplies it, hidden from you. The arrow marks the line running now. This is where the code you can see begins.
main() first calls init(). It sets up the chip's timers. Timer0 counts clock ticks and interrupts the program every 1.024 ms, so millis() and delay() can tell the time. init() also turns interrupts on.
setup(): once
Next, main() calls setup(). The arrow jumps into your sketch. pinMode(13, OUTPUT) makes pin 13, wired to the board's LED, an output. Then setup() ends and the arrow returns to main(). setup() runs once per power on or reset.
loop(): forever
Now main() reaches for (;;): a loop with no exit test, so it never ends. Inside, it calls loop(). The first line adds one to count: 0 + 1 = 1, written back into SRAM.
digitalWrite(13, count % 2). The % sign gives the remainder after dividing: 1 % 2 = 1. Writing 1, which is HIGH, puts 5 volts on pin 13 and the LED turns on.
delay(500) waits 500 milliseconds, half a second. Your code does nothing else meanwhile: delay() just watches the time Timer0 keeps. Interrupts still run, but no other line of your sketch can.
loop() ends and returns to main(). The for (;;) goes round and calls loop() again. count still holds 1, because globals keep their values: 1 + 1 = 2, and 2 % 2 = 0, so the LED turns off.
This is the superloop: set up once, then run one loop forever, with no operating system. Each pass does every job in turn, here about half a second per pass. So a slow job delays every other job.
What happens
;; step 1/10 · power
board Arduino Uno R3 (ATmega328P, 16 MHz)
power on or reset -> jump to the reset address
bootloader Optiboot, last 512 bytes of flash
(BOOTRST fuse set: reset starts here)
runs first, then jumps to address 0
your code at the start of flash
The main() card is simplified. The real one in the Arduino AVR core (cores/arduino/main.cpp) also calls initVariant(), attaches USB on boards that have it, and calls serialEventRun() after each loop() when a sketch uses serial events. It ends with return 0, which is never reached. The figure moves slowly so you can follow it. On the board one pass of loop() takes just over 500 ms: the delay plus a few microseconds for the other two lines.