Spending, income and value added
GDP can be added up as spending (consumption, investment, government purchases and net exports), as income earned, or as the value added at each stage of production, and the three give the same total because they count the same flow.
From AP Macroeconomics.