Automatically
A clock on WiFi checks shortly after it starts and every twelve hours after that. If it finds a newer build it downloads it, verifies the checksum, installs it and restarts — usually inside a minute. It will not interrupt a ringing alarm to do it; that check waits for the next cycle.