JavaScript is single-threaded. If you perform a 2-second calculation, your UI freezes. Web Workers allow you to spawn actual background threads that run in parallel to the main UI thread. This is True Parallelism for the web.
Web Workers live in a separate memory space. They cannot access the window, document, or state directly. You send them data using postMessage(), they do the work, and they send the result back. It is like an **Internal API call** within the browser.
Q: "What is the penalty of using Web Workers?"
Architect Answer: "The **Serialization Penalty**. When you send data to a worker, the browser must copy ('Serialize') that data into a format that can cross the thread boundary. For massive objects, this copy operation itself can block the main thread. To fix this, we use **Transferable Objects** (like ArrayBuffers), which 'transfer' ownership of the memory to the worker instead of copying it, making the hand-off near-instant."