GDP is a function of both price and quantity, but the change itself is often ambiguous. What if we only care about the change in quantity, or price? Two separate measures of GDP exist for that purpose.
Nominal GDP factors in changes to both price and quantity. Meanwhile, Real GDP only considers quantity. If prices change a lot, this makes a huge difference. Think of Venezuela, which struggled with hyperinflation. As prices skyrocketed, Venezuela's Nominal GDP grew with it, even as production declined. Real GDP, however, fell off with production.
Calculating Nominal GDP is is pretty straightforward. We just need the quantity and price in the current year (CY).
Since Real GDP holds price constant, we start by choosing a base year (BY). All calculations of Real GDP use that year's prices.
Notice how the only difference between Nominal GDP and Real GDP is whether or not prices change.
The quotient is what we call the "GDP Deflator". If the price of something was $1 in the base year, the GDP Deflator tells us how much it costs now.
Since the GDP Deflator isolates price changes, we can also use it to calculate the inflation rate between two years.
Inflation is just a measure of price changes.
To calculate the change in production between two years, we only need the Real GDP.
Economists prefer Real GDP because it prevents cases like that of Venezuela from skewing results. After all, money only exists as a medium for the exchange of goods and services. Those products, not the amount of paper in circulation, contribute to human well-being.