When PostgreSQL runs a query with a WHERE condition, it first checks if there is an index on the searched column. If an index exists, it uses an index scan to quickly find only the rows that match the condition. This means it reads fewer rows and returns results faster. If no index exists, it performs a sequential scan, reading every row in the table to find matches. The execution table shows each step: starting the query, checking for an index, using the index to find rows, returning results, and finishing. Variables like rows examined and scan type change as the query runs. Understanding when PostgreSQL uses each scan helps write faster queries.