JavaScript can be used to add, remove, or modify content on web pages, set CSS styles and classes, show/hide/animate parts of pages, react to user events like clicks and typing, and more. It uses variables to store values, functions to organize code for reuse, and selectors like jQuery to find and work with HTML elements. Code is added to pages within script tags and often wrapped in document ready functions to run when the page loads.