JavaScript can manipulate the DOM, which represents the structure of an HTML document, using methods like getElementById, querySelector, createElement, and others to dynamically update the content and styling of a webpage.