system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: In software, what exactly is a framework?
gpt
A lot of people here are merely defining what a library is, which is just a chunk of code that someone else wrote that provides useful utilities.

A framework goes further and creates an entire way of doing things. Often, it feels like a whole new language built on top of the base language. It imposes some sort of "opinion" about how things should be done.

Consider trying to make a complex website in HTML/CSS/JS. It's entirely possible to do so with no libraries/frameworks, but it's painful. When the user clicks something and you want some new content to appear, you have to write the code that programmatically generates the new elements, then go find where those elements should be inserted in the HTML, and call a bunch of clunky `appendChild` functions.

jQuery is a *library* that makes a lot of this easier. It provides a bunch of useful functions that make it much easier to create new elements and stick them in the HTML. But you're still fundamentally doing things the same way.

React is a *framework* that not only provides useful functions, it defines a whole new way of writing interactive websites. It has very strong opinions about the "right" way to write a web app. Instead of thinking about how user actions should cause visual changes, you think about the app having a "state" at any time. User actions modify state. And then you write code that defines what the app should display in terms of the current state. You never write the HTML-modifying code yourself, some magic under the covers does all of that for you.