(a_1,a_2), (a_2,a_3), ... (a_{n-1},a_n)
and approximately the area under the graph of the function via sums of the form
\sum_i f(x_i) (a_{i+1} - a_i)
where x_i is a point in the interval (a_i,a_{i+1}).
Lebesgue integrals turn this procedure on its head by partitioning the range of f into disjoint intervals
(a_0,a_1), (a_1, a_2), ... (a_{n-1},a_n)
and approximating the area under the graph of the function via
\sum_i m({x : a_i < f(x}) < a_{i+1}) a_i
where m(E) refers to the "measure" of the set E. That is, for each i, we multiply the "size of the set on which f is mapped to a value near a_i" by a_i and then sum over i.
The principle advantage of the Lebesgue scheme is that f can be very badly behaved and the quantities involved are still well-defined and make sense, whereas the Riemann integral only leads to reasonable approximations if f is somewhat well-behaved (more-or-less continuous). Otherwise, the value of f(x_i) (x_{i+1}-x_i) is not a reasonable approximation of the area under the graph of f "over the interval (x_{i+1}-x_i)".
There are even more general notions of integral. To my knowledge, most are based on observing that an integral is a linear functional on some space which should satisfy certain properties.