The event loop processes the call stack and message queue. Microtasks (Promises) run before macrotasks (setTimeout). This determines execution order of async code. Understanding it prevents race conditions and unexpected behavior.