I know this is part of the Extreme Value Theorem but I want to tackle this one bit first, focusing on the maximum case.
For a function $f$ continuous over interval $[a,b]$, it has a max value over this interval.
I define the max like so: $\exists d \in [a, b] : \forall x \in [a, b], f(x) \leq f(d)$
One way to begin tackling this is to prove by contradiction by showing the negation is false.
$\forall d \in [a, b] , \exists x \in [a, b]: f(x) > f(d)$
In other words if there is no maximum then it means for any $d$ we choose, there's a value of $x$ where $f(x)$ is even greater.
The usual proofs I see just throw a bunch of set theory and notation at the problem that I don't understand, involving things like subsequences or "compactness" for some reason. I don't understand the use, purpose, or motivation for these approaches.
Is the general idea to show that the negation implies the function going up to infinity, which somehow contradicts our assumption of continuity?
The negation says: "it is not bounded". So yeah the idea is to use that and reach a contradiction.
Without compactness you can't do it. Compact=bounded and closed. If it is open say on the right $[a,b)$ then the function can explode in b and still be continuous. Look at $1/x$ on $[-1,0)$.
If it is not bounded then just take literally any continuous function that goes to infinity, say a non constant polynomial...