Think of models as something that holds data. It holds the information regarding the data (so class attributes [variables]) and it holds rules to define the standards of that data (rules and validation methods [functions]).
Controllers are what manipulate models. They hold the methods used to manipulate the data.
So following your example you have a search form. The “data” class that’s a model will probably hold information such as the date, time, data id and a variety of other fields depending on what it is you’re storing (if it was emails, you’d have to, from, message etc.).
Now the model there will validate the data as it accepts it. So your search queries will have to be of a certain format (dates have to be proper dates and so on). Everything goes well then you will be able to manipulate the data within your controller.
So now in your controller, the action method that leads to the page you’re operating the search would validate the data (based on the methods part of the model) and then once everything is validated, it can perform the queries and other functions that search and pull the data in the database via queries.
The controller would then pass these results from data manipulation on to the view to present.
Hope that clears up the setup for you. Just know that data is stored in a model, it’s manipulated in a controller and it’s presented in a view.