Library
Pre-written code that someone else made and that you can import and use.
"Don't reinvent the wheel" in practice. Want to handle dates? Use date-fns or moment. Need HTTP calls? axios or fetch. There are libraries for practically everything.
Difference from framework: you call a library when you want; a framework controls the app's structure. JS packages live on npm, Python on PyPI, PHP on Packagist (Composer).