Normally execution is locked to one thread and scripts will be executed in the order they appear in the document. However, you can run scripts in background threads using Web Workers.
More info can be found in the W3C spec: http://www.w3.org/TR/workers/
Or on MDN: https://developer.mozilla.org/en-US/docs/Web/Guide/Performance/Using_web_workers