Database management systems use query processing to retrieve data from databases. Queries are submitted to the database management system which then parses, compiles and executes the query to retrieve the requested data. The database management system optimizes queries for efficient execution and retrieval of results.