Subqueries and nested queries work by running the inner query first to get a result. This result is then used by the outer query to filter or select data. For example, to find employees in the Sales department, the subquery finds the Sales department's id. Then the outer query uses this id to find matching employees. The execution steps show the subquery running first, returning id 3, then the outer query filtering employees with department_id 3. Variables track the subquery result and how it is used. Common confusions include why the subquery runs first, what happens if it returns multiple or no values. Quizzes test understanding of these steps and results. Remember, subqueries must return appropriate values for the outer query to work correctly.