If you've heard anything about the Lebesgue integral, it's probably been in contrast to the Riemann integral: Riemann integration finds the area under a graph by taking vertical rectangles and summing them, but Lebesgue integration sums horizontal rectangles. I was surprised to realize that this strategy is not unique to integration with respect to the Lebesgue measure. It holds for any other measure, as long the measure space satisfies the conditions of being $\sigma$-finite and complete—a small price to pay for this blood-sugar spiking result, the Layer Cake Decomposition theorem.
Let $(X, \mathcal{M}, \mu)$ be a complete $\sigma$-finite measure space. Let $f$ be a non-negative measurable function, $X \to [0, \infty]$. Then $$\int_X f d \mu = \int_0^\infty \mu(\{x : f(x) > t\}) d\lambda(t).$$
This is the typical picture of the Lebesgue integral. Horizontal rectangles—or layers—under the graph of $f$ are stacked and added up with the integral. We rigorize our argument, which will appear to be just a medley of symbols interchanged by Tonelli's theorem.
Proof: Using Tonelli's since we can show $\chi_{\{t \; : \; 0 \leq t < f(x)\}}$ is non-negative and measurable with respect to $\mu \times \lambda$, $$\begin{align*} \int_X f d \mu &= \int_X \int_0^{f(x)} d\lambda(t) d\mu(x)\\ &= \int_X \int_0^\infty \chi_{\{t \; : \; t < f(x)\}} d\lambda(t) d\mu(x)\\ &= \int_0^\infty \int_X \chi_{\{x \; : \; f(x) > t\}} d\mu(x) d\lambda(t)\\ &= \int_0^\infty \mu(\{x \; : \; f(x) > t\}) d\lambda(t) \end{align*}$$ as desired.
Even if it's clear that each step is justified, let's visualize what happens when we apply Fubini's theorem. In the second line of the proof, before we integrate with respect over $X$, we fix $x$ and find the Lebesgue measure of all the $t$ below $f(x)$ at that point. Then we "multiply" by $d \mu$ along the $x$-axis. This looks like taking vertical rectangles underneath the graph of $f$, the idea behind the Riemann integral. A subtle difference is that we require the functions that we integrate in the Riemann sense to be bounded, but our $f(x)$ for certain $x$ may be infinite.
After swapping the order of integration using Fubini's theorem in the third line, we fix $t$ along the $y$-axis and arrive at the Layer Cake integration strategy.
The most important takeaway is that since most of the measure spaces that you'll work with will be $\sigma$-finite and complete, there are not just two ways of integrating, vertical versus horizontal. Since the Riemann integral can be subsumed by the Lebesgue integral, the vast majority of integration, if you index by measures, seems to be the Layer Cake method. Sweet!