A Content Management System (CMS) is the solution to problem with many early websites. Most of the early websites were files text and images, which the website creator wrote and uploaded to the server. Often, selling a website was a loss leader for the developer because the expectation was that every time the client wanted a change to the site, they would pay fee for that change. Changing the file did not take a huge amount of skill. Nevertheless it was more technically demanding than editing a Word document, for example, and a small error in the HTML markup could break the site's appearance, so in many cases the supplier would pick up regular work in this way. Tools like Microsoft's Front Page were designed to streamline the process, at the cost of inferior quality markup. Poor markup has certain consequences: it may lead to a lower place in search results for your site, and it may increase the chance of unexpected problems with the page.
Another disadvantage of a site where you need to create a separate file for every page is that many reusable elements must be updated on every page. For example if you have 20 pages in your site, and you add or edit a menu link in a menu which appears on every page, that change must be applied to all 20 pages. On a website which assembles the page programmatically, you can edit the menu once, and your edit will be applied to every page where that menu is used automatically.
A CMS replaces the pre-written files of HTML which compose the website with pages of HTML which are generated afresh by a programme every time someone visits the site. One benefit of this is that it allowed the construction of websites where a person with limited technical knowledge could log in via a browser and update the site quickly and easily. Web pages which are generated by a programme, rather than stored in a file, are almost as old as the web itself. However, in the early days they were not widely seen because the website builder would need to build a programme themselves in order to generate the pages. Gradually, however, website makers started sharing their programmes, and software houses started selling programmes, for making websites. The consequence was that you have a programme which generates a website 'out of the box' without needing to any programming yourself, except to the extent that you wanted customised modification to the way the programme worked.
There are hundreds of CMSs. Some are commercial products aimed at large companies, with huge licence fees. Some, like WordPress, were published licence free, available for use by anyone, and improved by the efforts of the community of programmers who use them. One of the earliest CMSs to gain widespread use was Drupal, first released by a computer science student in 2001. It has now developed to the point where it is well adapted to some of the largest 'enterprise' sites, and is serious competition for the largest and most expensive commercial products. Drupal, WordPress, and Joomla are together the most widely used CMSs by a significant margin.
Not every modern website uses a CMS. A site made up of simple files, known as a static site, still has certain advantages. For one thing, it is far harder to hack than a CMS-driven site. There are now tools which to some extent streamline the creation of static sites. At the other end of the scale, usually for large sites, there are now ways of building websites, and supplying data to other interfaces such as mobile apps, which do not depend on a CMS programme running in the background. These architectures are known as headless.
Besides, where there is a CMS, sometimes or sites with a large budget it is still custom built, rather than depending on taking an out-of-the-box system like WordPress or Drupal and adapting it. For sites with very specific requirements, such as an airline booking system, it often makes more sense to programme the CMS by hand. In these cases, it is usual to start with a Content Management Framework (CMF), where some of the essential tools which every website needs are pre-built programme modules--tools like a contact form and a login system--and build a custom site using these building blocks.
Drupal is designed to be usable as a CMS where the architecture of the website is mostly pre-built when the programme is installed, or as a CMF, where its building blocks can be re-used and assembled in a more customised way. Many Drupal sites are built as a half-way-house, using more or less extensive amounts of the pre-built architecture and integrating other features which are largely 'hand-made' by writing code which uses in custom contexts some building blocks of ready-made code which the software includes.
Of course, the degree of customisation which is possible in a professionally built site is closely related to the budget. When you install Drupal you have a very sophisticated site, representing tens of thousands of hours of work by skilled programmers, free of charge and ready to use within minutes. The main cost of the site to the client lies in the customisations you require. There are also ongoing maintenance costs. For some situations it follows that a simpler system, provided it offers all the customisation which are needed to meet the client's business case, can be a better choice. The simpler system may be more expensive and more difficult to customise, and less work to maintain if you don't want those customisations, and if you don't discover in future that you want them after all.