Test scores in a class vary: some students score 60, some 95. With no other information, your best guess for every student is the class mean, and your total squared error is SStotal=∑(y−yˉ)2. Now use hours studied and the regression line to predict each score. The predictions still miss, leaving SSresidual=∑(y−y^)2. The fraction of the original error that disappeared is r2=1−SStotalSSresidual.
For example, if SStotal=2000 and the line leaves SSresidual=500, then r2=1−2000500=0.75: the line explains 75% of the variation in scores, and 25% comes from other things such as sleep, prior knowledge or luck. For a straight-line fit this equals the correlation squared, so r=0.9 gives r2=0.81, and so does r=−0.9.
Because squaring drops the sign, r2 can't tell you whether y rises or falls with x; look at r or the slope for that. Squaring also shrinks: r=0.5 sounds moderate, but r2=0.25 leaves three quarters of the variation unexplained. And a high r2 shows a strong linear pattern, not causation: monthly ice cream sales and drownings can have a sizable r2 because both rise in hot weather.
Think of it like this. The total variation in y is a pie. The regression line claims the slice it can explain, r2, and the residuals keep the rest, 1−r2. A thin slice means x explains little; a nearly whole pie means the points hug the line. The pie says how much is explained, never which way the line tilts.
Core idea. r2 is the proportion of variation in y accounted for by the linear relationship with x — the square of the correlation.