John Resig explains JavaScript timers. Because of JavaScript's single-thread nature it is easy to write blocking code that makes pages unresponsive. Timers allow us a mechanism for yielding control back to the browser, queueing the code up to run a little later. John goes into depth on this particular topic.