Let f map a region R into the reals, where R is a closed bounded set in Rn. Assume f is continuous. We will show that f is bounded. We'll show this in 3 space, although the prove is valid in n dimensions.
Suppose f is unbounded and place the origin at the center of R. Draw the three planes perpendicular to the three coordinate axes. These planes divide R into 8 pieces. Each subregion includes the planes that separate it from the other subregions, hence each new region is closed. If f is bounded on all 8 regions it is bounded on all of R, hence f is unbounded on one of these regions. Call it R and repeat the above procedure.
with each step the region is smaller; its dimensions are cut in half. Points of R, drawn from these shrinking regions, cluster together. If you want to be formal about it, these points form a Cauchy sequence, and since Rn is a complete metric space, they approach a point that I will call p. Since R is closed it contains its limit points, hence p is in R.
Since f is continuous it is certainly continuous at p. Find a neighborhood δ about p that restricts f(x) to f(p)±1. Clearly f is bounded when restricted to this neighborhood, yet this neighborhood includes small regions that are allegedly unbounded. This is a contradiction, hence f is bounded on all of R.
This theorem fails when R is an open set, as p may lie on the boundary of R. The function 1/x is continuous on the open interval (0,1), yet it is unbounded.
since f is bounded on R, let u be the least upper bound. Let g(x) = 1/(u-f(x)). If f never attains the value of u, then the denominator is always nonzero, hence g is well defined and continuous. By the above, g has some upper bound b. This means f(x) never gets within 1/b of u, which is a contradiction, since u is the least upper bound. Therefore f(x) = u for some x in R. In other words, f attains its upper bound.