Microsoft Access organises a database using several types of objects, each with a distinct job. Tables store the raw data itself, forms provide a user-friendly screen for entering and viewing records, and reports present data for printing or summarising, often with charts and formatted layouts. A query is the object designed specifically to pull out particular data from one or more tables based on conditions the user sets, and it can also sort and filter that data before displaying it.
For example, a query could be built to show only the students who scored above a certain mark from a larger table of all student records, ordering the results by score. Defining the overall structure of tables and their relationships is done in the table design and relationships view, not by a query. Creating a user-friendly interface for entering and editing data is the job of a form. Visually representing data trends through charts and graphs is the job of a report or a chart object, not a query. Because retrieving, filtering, and sorting specific data based on set criteria is precisely what a query is built to do, that is its primary purpose.
Examination reminder: in MS Access, remember the specific role of each object: tables store data, forms capture and display it, reports present it, and queries retrieve and filter it based on criteria.