The event loop repeatedly goes through phases (timers, poll, check, close) and runs the callbacks that are ready. Your JavaScript runs on one thread, so a long synchronous task delays everything else.