In WordPress, queries are used to access data from your MySQL database. WordPress is written using PHP and MySQL. Each time you are viewing a WordPress page, there are MySQL queries running in the background to fetch the data from database. This data is then used to dynamically generate HTML for your browser.