A framework is a collection of resources which can be used to build something on the web.
Most projects tend to share a lot of common functionality, especially under the hood. Such functionality might include serving the correct page content to a site visitor, or providing a login system (known as authentification).
This common functionality can therefore be pre-written and packaged together to form a framework. Developers can then use a framework to build their project, by combining the parts they need, and ignoring the parts they don’t (for now).
By using a framework, developers can save time by avoiding having to ‘reinvent the wheel’.
Some examples of web frameworks include WordPress which is used to build websites and Laravel which is used to make database-driven web apps. Both of these frameworks use the programming language PHP, as well as other tools such as JavaScript, HTML and CSS.
Most programming languages nowadays have a few major frameworks that developers would be expected to work within. Understanding a single framework that is used on many projects means a developer can support multiple projects at once as well as quickly get up-to-speed with new ones.
Using a framework is generally safer than coding everything from scratch. A framework which has been used for years, on many different projects, will have benefited from a lot of user feedback to improve the codebase and iron out the bugs.