Javascript is useful for adding some interactivity to a page.
Examples of javascript include buttons that change as you move the mouse over them and click them, such as this:
Javascript can also be used to validate forms to check people have included all the information you want, producing pop-up windows like this one and a variety of other effects.