Macros in dbt are reusable pieces of SQL code. You define a macro with a name and parameters. Inside, you write SQL that can use those parameters. When you call the macro in your SQL model, dbt replaces the call with the SQL code from the macro, filling in the parameters you gave. Then dbt runs the full SQL query. This way, you write common SQL logic once and reuse it many times with different inputs. For example, a macro can filter active rows from any table by passing the table name as a parameter. The macro call expands to a full SQL SELECT statement with the filter. The actual data comes from running this expanded SQL. This saves time and keeps your SQL DRY (Don't Repeat Yourself).