The Model View Controller (MVC) is possibly the most well-known software design pattern used in web development.
What is it? It is separating the code into these areas of concern:
Model – The data. This can include the SQL commands and also the business logic, i.e. validations.
View – This is what the user sees.
Controller – This is responsible for handling the GET and POST requests and CRUD actions. The Controller is the connection between the Model and the View.
For instance, if a user presses the Show All button in the View, the Controller will send the appropriate request to the Model, the Model will query the database and then send the results to the Controller, then the Controller will send that information to the appropriate View.
For more thorough and detailed explanations check out the following links: