So I understand that the definition of consumer surplus is the difference between what the consumer pays and what the consumer would have been willing to pay. I just don't understand why the consumer surplus is the area of the triangle, as shown in the diagram. Is it representing all the possible consumer surpluses?
This is quite fundamental, so I'd encourage you to look up your textbook as well... but here's a short explanation.
Imagine that there are $n$ consumers in the market. You sort them by their willingness to pay from high to low. So the first consumer is willing to pay very high, and so on. Let's say the willingness to pay (sorted) is 12, 10, 9, 7, 5, 4, 2. This is represented by the downward-sloping demand curve.
Let's say the price is \$8.
The first consumer's surplus is $12-8 = 4$. The second consumer's surplus is $10-8 = 2$. The third consumer's surplus is $9-8 = 1$.
The fourth consumer onward wouldn't buy the item, since their willingness to pay is lower than the price. Their surpluses are all zero. They are the ones on the right of the equilibrium quantity.
The sum of the consumers' surplus is 4 + 2 + 1 = 7, which is given by the area under the demand curve and above the price the consumer pays.
Hope that helps!
Beyond Art's good and didactic answer you may find the following paper interesting: Using Big Data to Estimate Consumer Surplus: The Case of Uber. It gives a real and concrete example of how to define a consumer surplus.
Using almost 50 million individual-level observations [...], we estimate that in 2015 the UberX service generated about \$2.9billion in consumer surplus in the four U.S. cities included in our analysis. For each dollar spent by consumers, about \$1.60 of consumer surplus is generated. Back-of-the-envelope calculations suggest that the overall consumer surplus generated by the UberX service in the United States in 2015 was \$6.8 billion.
There is also a Freakonomics podcast based on this paper: Why Uber Is an Economist's Dream. Levitt's claims that the Consumer Surplus concept dates back form Jules Dupuit, a 19th-century economist and hydraulic engineer, who helped build the sewer system of Paris. The following website offers a nice historical view and description of the Consumer Surplus.