Javascript is a programming language that is primarily used to write comparitively short Scripts that will add interactivity and conditional behaviour to Web Pages and enhance functionality.
It is used extensively on Websites to create things like mouse roll-over effects, menus, load pages in new windows or frames, navigation aids, passwords, etc. It is also invaluable in ECommerce websites as javascript is frequently used to provide supporting Cookies to track customers purchases & selections in a Shopping Cart and making the selected products available at Checkout. Without Cookies, this essential task would be much more complex and probably not user friendly.
Javascript is not related to Java Applets despite the name similarities.