In the context of web development, a framework typically refers to an application which provides a foundation (code + best practices) for building your project.
If you're using Drupal, you are using it as the foundation of your project - not an add-on. Therefore, it's a framework.
A counter-example would be jQuery. jQuery is a library; it's not typically used as a framework. You may use jQuery for a single component on a page.
And some technologies can function as either a framework or a library depending on how they are used! VueJS is a great example of that. You can use it as a framework to build out your entire frontend, OR you can use it as a library for a single component on a page.