A JavaScript library is a collection of pre-written JavaScript code that allows for easier development of JavaScript-based applications. These libraries offer a range of functionalities such as DOM manipulation, event handling, animation, and more. Popular examples include jQuery, React, and Angular.