A Riemann sum approximates the area under a curve using rectangles of varying widths, where the width of each rectangle is the interval of the partition and the height is the value of the function at that point. It allows calculating the area under a curve or length of a graph by breaking it into smaller pieces. The example shows using a left Riemann sum with 4 subintervals to estimate the area under the parabola f(x) = x^2 + 1 from 0 to 4.