The cubic yard is a unit of volume derived from the imperial system of units. It uses the symbol yd³.
It equals the volume of a cube with edges that each measure 1 yard. It is equivalent to 27 ft³, 46656 in³ or ≈ 0.764554 m³.
The yard (and derivatives like the cubic yard for example) are the same in both the imperial systems and US customary systems so require less conversion systems to calculate / convert to SI or metric.
The liquid gallon is a unit of volume in the US customary unit system and uses the symbol gal.
It is the most common use of the word gallon and is defined as 231 in³. It is made up of 4 quarts where there are 2 pints in a quart and 16 US fluid ounces in a US pint. There are therefore 128 US fluid ounces in a US gallon.
The term gallon is most prevalent when discussing and trading oil and fuel. To ensure consistency, the temperature of the liquid (typically petroleum or alcohol) is understood to be 15.6 °C (60 °F) at the time of measurement.