A library can be defined as a bunch of code that can be used for a specific purpose.
The key difference between a library and a framework is “Inversion of Control”
On the other hand, a framework can be defined as the skeleton of a project which helps you eradicate the need for hard coding, it provides initial support to start the project.
Bootstrap can be considered as a typical example of a web framework that provides you all the predefined classes and fonts and many other features that make your development faster and easier.
As a very summary, library is just for code reuse, framework is for logic or data flow reuse. Libraries mostly can not dictate or guide the way your application design but frameworks can.
Happy Coding 😎🤩