Suppose we want to calculate the sum of squares with successive differences $\epsilon$ from $0$ to some fixed $n$ (we require $\frac{n}{\epsilon}\in\mathbb{N}$ for this particular calculation, however for the general formulation of integrals and Riemann sums, this is not required), that is
$S_\epsilon = \sum_{i=0}^{\frac{n}{\epsilon}}(i\epsilon)^2$
letting $m = \frac{n}{\epsilon}$ this sum is equivalent to
$\sum_{i=0}^{m}i^{2}\left(\frac{n}{m}\right)^2$
which we can write as
$=\left(\frac{n^2}{m^2}\right)\sum_{i=0}^{m}i^2=\left(\frac{n^2}{m^2}\right)\frac{m(m+1)(2m+1)}{6} $
$= \frac{\left(\frac{n}{m}\right)m\left(\frac{n}{m}\right)(m+1)\left(\frac{n}{m}\right)(2m+1)}{6\left(\frac{n}{m}\right)}=\frac{n(n+\epsilon)(2n+\epsilon)}{6\epsilon}$
taking the limit $\epsilon\rightarrow 0$ this is equivalent to $m\rightarrow\infty$ and $S_{\epsilon\rightarrow 0}$ is easily seem to be divergent to $+\infty$. However, $S_{\epsilon\rightarrow 0}\cdot \epsilon$ is convergent (which easily evaluated by simply substituting $\epsilon = 0$, which we can do by the continuity of the expression) and is of certain interest. In particular, we can write
$S = S_{\epsilon\rightarrow 0}\cdot\epsilon=\lim_{m\rightarrow\infty}\ \sum_{i=0}^{m}\left(i\frac{n}{m}\right)^2\left(\frac{n}{m}\right)$
we recognize this as the Riemann Sum which defines the integral
$\lim_{m\rightarrow\infty}\ \sum_{i=0}^{m}\left[f\left(x_0 + i\frac{n}{m}\right)\frac{n}{m}\right]=\int_{x_0}^{x_0 + n}f(x)\ dx$
for $f(x) = x^2$ and $x_0 = 0$. (In particular this is the left Riemann sum). By the Fundamental Theorem of Calculus,
$\int_{0}^{n}x^2\ dx = \frac{x^3}{3}\bigg|_{0}^{n} = \frac{n^3}{3}$
which is exactly the quantity you cite.