A car's speed is logged every 10 seconds: 0, 8, 14, 18, 20 m/s. To estimate how far it went, pretend the speed stayed fixed during each 10-second slice. Using the speed at the start of each slice gives 10(0+8+14+18)=400 m; using the speed at the end gives 10(8+14+18+20)=600 m. Each product, speed times 10 s, is the area of a rectangle under the speed graph, and adding those areas is a Riemann sum.
Each rectangle has width Δx=nb−a and a height equal to the function's value at a chosen sample point: the left end, the right end or the midpoint of the slice. For a rising curve the left heights sit below the curve and undercount, while the right heights overshoot; for a falling curve it is the reverse. Since this car only sped up, its true distance lies between 400 m and 600 m.
More rectangles shrink the error. For ∫02x2dx the right sum is 3.75 with n=4 and about 3.19 with n=8, closing in on the exact 38≈2.67. The definite integral is the limit of these sums as n→∞. A finite sum is still only an estimate, though. When the function has an antiderivative you know, as x2 does, the Fundamental Theorem gives the exact value directly; rectangles are for data, for functions with no usable antiderivative, and for defining what an integral means.
Think of it like this. A city skyline built over a hill: every building has a flat roof set to the hill's height at one spot, and the combined area of the building fronts approximates the area under the hill. Narrower buildings hug the slope more closely. Unlike real buildings, a rectangle can hang below the axis when f is negative, and then its area counts as negative.
Core idea. A Riemann sum estimates a definite integral by slicing [a,b] into strips and adding the areas of rectangles whose heights come from the function.