There are 4 quarts in a gallon. Think "quart" as in "quarter". So you will multiply the gallon amount by the factor "4 quarts/1 gallon". The "gallon" unit in the denominator will cancel with the original "gallon" unit.
This is what it will look like as an equation
So if you know the amount of gallons (x), you can use that equation to find the amount of quarts (y).