library, just like a real library, has resources (functions for eg) that you can use as you see fit. It doesn’t force you to use anything.
framework, unlike a library, forces you to fit into it. (You have to go out of your way to not fit). Imagine a framework for a building. It forces the builders to build within it. The building will be what the framework says it should be.
I’ll let someone more experienced in Node.js respond to the part about RTE.
Come to us = frontend. we go to them = backend but both can be frameworks. But as @hbar1st pointed out a library is just a resource you may use for your own needs by just using specific functionalities. Instead a framework imposes you to follow a certain development pattern.
I’ll answer this question on two levels:
(1) The designer/implementer of a framework or library did it that way for their own reason which is known only to them.
(2) Bootstrap is a CSS framework because once you adopt it, it changes the way you approach and write your CSS code. jQuery, on the other hand, doesn’t change the way you approach and write your JS code. It simplifies things, but it doesn’t change your fundamental approach. A true JavaScript framework is something like Angular—your whole approach to the front-end is entirely based on it, and you pretty much fill out only the specific areas that need customization.
Run-time environments are a little trickier to explain and this will gloss over a lot of details, but:
You write the source code of a program using a programming language
In compiled languages (C and C++), the source code is converted to an executable file that runs directly on the host computer
Alternately, in interpreted languages (Python, JavaScript, Ruby), the source code is converted to an intermediate form that runs in the interpreter (which is a program that runs directly on a host computer)
The interpreter can be thought of as a “run-time environment” because it’s the environment that runs the code that you wrote
For Python, the usual run-time environment is the Python IDLE, and other languages have their own (like the REPL for Ruby). JavaScript’s RTEs are either in the browser (any Web browser) or Node.js, an environment outside the browser.
At some point you need to run the code you write, and that code needs to make physical things happen within the computer it is executing on. A runtime environment is somewhere that can allow that to occur. So your JavaScript code, when executed in the Node environment, can communicate with the computer system that version of Node is built for.