There are three crucial steps:
1) Bolzano-Weierstrass Theorem stating that
Every bounded sequence of real numbers
has a convergent subsequence.
The method of the proof sometimes is jokingly
referred to as "how to catch the lion in the
Sahara desert".
2) Next, is the First Weierstrass theorem stating that
Every function $f$ which is continuous on a (finite)
closed interval $[a,b]$ of $\mathbf R$ is bounded.
The standard proof is towards a contradiction: suppose
that there is a sequence $(x_n)$ of points of $[a,b]$
such that
$$
|f(x_n)| \to +\infty.
$$
Then we shall quickly obtain a contradiction if we apply
the Bolzano--Weierstrass theorem (think how it may be done).
3) Finally, the Second Weierstrass theorem a.k.a. the
Extreme Value Theorem stating that
Every function $f$ which is continuous on a (finite)
closed interval $[a,b]$ of $\mathbf R$ attains in
this interval its minimum and its maximum value.
To decipher, there are $x_0,x_1 \in [a,b]$ such that
$$
m=f(x_0) \le f(x) \le f(x_1)=M
$$
for all $x \in [a,b]$ (in particular, the image of $[a,b]$
under $f$ is $[m,M]$). Naturally, we apply the First Weierstrass theorem.
Studying examples to understand the Second Weierstrass Theorem would be of a little help; concepts and proofs matter more.