Overview of: Maximization and minimization
Local minima or maxima of a function $f$ can occur only at a critical point of $f$. (After all, $f$ must be either be always increasing or always decreasing in intervals between critical points, so none of these interior points can be a local maximum or local minimum.) Whether a critical point is a maximum or a minimum depends on whether $f$ changes from increasing to decreasing or vice versa.
A global maximum or minimum of $f$ over an interval can occur only at a critical point or at one of the endpoints. A simple way to find the global maximum and minimum is to calculate the value of $f$ at the critical points and the endpoints and see which is largest and smallest.