JavaScript is a scripting language used by front end developers (people who build parts of a website or web app that users see on their screen) to implement and manage dynamic content. There are other scripting languages out there, including Python, but JS is the most commonly used.
Therefore, JavaScript libraries are collections of pre-written code snippets that can be used (and reused) to perform common JavaScript functions.
The earliest of these was the magnetic device. Computer systems began with magnetic storage in the form of tapes (yes, just like a cassette or video tape). These graduated to the hard disk drive and then to a floppy disk.