The second derivative f''(x) is the rate of change of the slope. When it is positive the slope is increasing and the graph bends upward like a cup (concave up); when it is negative the graph bends downward like a cap. At a critical point, a cup means a valley and a cap means a peak. That is the second-derivative test.
f''(x) = \bigl(f'(x)\bigr)' In words: differentiate twice. f'' > 0: concave up; f'' < 0: concave down; a sign change of f'' is an inflection point.
\begin{align*} f'(c) = 0,\ f''(c) > 0 &\Rightarrow \text{local min}\\ f'(c) = 0,\ f''(c) < 0 &\Rightarrow \text{local max}\\ f'(c) = 0,\ f''(c) = 0 &\Rightarrow \text{no conclusion} \end{align*} In words: a flat point in a cup is a valley, in a cap a peak. If the curvature is zero, fall back on the first-derivative test.
Take f(x) = x^4 - 4x^3. Then f'(x) = 4 x^{3} - 12 x^{2} = 4 x^{2} \left(x - 3\right), with critical points x = 0, 3, and f''(x) = 12 x \left(x - 2\right).
At x = 3: f''(3) = 36 > 0, a cup, so a local minimum with f(3) = -27.
At x = 0: f''(0) = 0, so the test is silent. The slope is f'(-1) = -16 before and f'(1) = -8 after: falling on both sides, so x=0 is neither a minimum nor a maximum (it is a flat inflection point).
The inflection points, where f'' changes sign, are at x = 0, 2.
The second derivative measures curvature, and curvature decides two things in the app: whether a function is convex (f'' \ge 0 everywhere; next refresher) and how big a Newton step to take (the step divides the slope by f''). In several variables f'' becomes the Hessian matrix and the test becomes a check of its eigenvalues.