JavaScript is a programming language: a precise way to give a computer instructions. You write the instructions as text, and a program called a JavaScript engine reads them and carries them out, one after another.
Every modern web browser contains a JavaScript engine. That is why JavaScript is the language of interactive websites: it reacts when you click, checks a form before it is sent, updates a shopping-cart total or draws a chart.
JavaScript is not limited to browsers. Node.js runs JavaScript on servers and laptops, where it can read files and answer web requests. Level 5 of this academy uses Node.js, and those lessons come with projects you run on your own computer.
When you press Run Code in a lesson, your code runs in a sandbox: a sealed-off area of your browser. Your code can calculate and print results, but it cannot see this page or your saved progress, so you can experiment freely.
JavaScript is standardised as ECMAScript (ECMA-262). The language defines values, operators, functions, objects, modules and so on, but no way to show a window, read a file or make a network request. Those capabilities come from the host environment.
A browser host adds Web APIs such as the DOM (document), fetch, timers and storage. Node.js adds modules such as fs and http instead. The language core is shared, so 2 + 3 behaves identically everywhere, while document only exists in a page.
Engines (V8 in Chrome and Node.js, SpiderMonkey in Firefox, JavaScriptCore in Safari) parse the source text, compile it and execute it on one thread per agent, scheduling further work with an event loop.
The academy runs plain-JavaScript lessons in a dedicated Web Worker created inside a sandboxed iframe with an opaque origin, and DOM lessons in a fresh sandboxed iframe. A worker has no document, which is why DOM examples show a separate preview.