In my math class, we started looking at integration a few months ago, and recently, our teacher introduced us to the following equation for calculating the volume of revolution of a function $f(x)$:
\begin{equation} V=\int_{a}^{b}\pi f(x)^2 dx \end{equation}
The equation is relatively simple, but my teacher provided no explanation as to why this is the case. I was also unable to find an explanation in my book or online. If anyone understands why I would be really interested.

More precisely, revolving about the $x$-axis gives you this formula. The quantity $\pi f(x)^2\Delta x$ is the volume of a cylinder of base $f(x)$ and height $\Delta x$ (viewing sideways). Thus the volume is approximately $\sum \pi f(x_k)^2\Delta x.$ We achieve the exact volume by letting $\Delta x \to 0,$ resulting in the integral.