Web Workers are one of the new features in the HTML5 spec and allow us to essentially create multiple event loops. By running expensive operations in their own threads, the user experience stays responsive. Below is an example of an expensive operation implemented with and without a worker.
Take a look at the source code of this article for a simple working example. You can read more about web workesr here. If you have any questions, feel free to ask me.