Below is a proof I found on the internet:

Here comes my questions: If $f$ is defined as above, meaning $f$ is defined for all $x ∈ K$ Doesn't that directly imply that $f$ must be bounded for all $x ∈ K$ on that interval? Since $f(x) = ∞$ or $f(x) = -∞$ cannot be valid values to have in the range of any function? I am guessing that is what they are saying at the step $\lim_{i\to ∞}f(x_{n_{i}})=f(x)$, but why do all the work before and after if you are going to make that argument? Also if I am correct then my result is more general then the theorem's result since if f is defined at any compact set that must mean that f is bounded (since $∞$ and $-∞$ are not valid values to have in the range of any function) but it does not have to mean that $f$ is continuous. Are there any flaws with my proof?
You're misunderstanding the definition of "bounded". Forget about continuity/compactness for the moment. Let $X$ be a non-empty set, $f:X\to \Bbb{R}$ a function, and consider the following two statements:
For every $x\in X$, $f(x)$ is finite (i.e $f(x)\in \Bbb{R}$... also commonly written as $|f(x)|<\infty$)
There exists a number $M>0$ such that for every $x\in X$, $|f(x)| < M$
Adding the qualifying phrase "there exists a number $M>0$" changes the entire meaning of the sentence.
Note that since the function $f:X\to \Bbb{R}$ has $\Bbb{R}$ as its target space, the first statement is always true, for a very trivial reason, which is why it has no special name. The second statement says something very different, and in fact it is a much stronger assertion. The definition of "$f:X\to \Bbb{R}$ is bounded" is the second statement.
Gemetrically, the difference is clear if you consider $X= \Bbb{R}$ and $f(x) = e^x$ and $g(x) = \arctan(x)$; try sketching the graphs of these two functions and try to see why $f$ is not bounded, while $g$ is bounded.
A corollary of the theorem you posted is that
which once again is a completely different assertion from (the completely trivial assertion that) "for every $x\in K$, $f(x)$ is finite".