JavaScript is a scripting language used to add interactivity to HTML pages. It can be embedded directly in HTML and is supported by major browsers. JavaScript code can be placed in the head or body section of an HTML document and will run when the page loads. Variables are containers that store information and can be assigned values. Functions contain blocks of code that are executed when called. Dynamic HTML (DHTML) allows complete control of HTML elements using JavaScript to dynamically change element positioning, styles, and handling events.