This is the extreme value theorem: a continuous function on a closed, bounded set attains its maximum and minimum. Without closedness (for example \(f=x\) on \(0<x<1\)) or without continuity, it may fail to attain them.
The absolute extrema of a function \(f\) on a closed, bounded region \(D\) are the minimum \(m\) and the maximum \(M\) of the values \(f\) takes on \(D\).
\[m=\min_{D} f,\qquad M=\max_{D} f\]
More practice problems: absolute extrema on a region