Today, in class we were presented this theorem
Let $f:[0,1]\mapsto [0,\infty]$ be a bounded, measurable function, prove that $\int_{[0,1]} f\text { }dm=\inf\{\int_{[0,1]}\phi\text{ } > dm\text{ } | \text{ } \phi:[0,1]\mapsto [0,\infty] \text{ is simple, measurable and } f\leq\phi \}$
Our teacher said we can examine the proof if we want to:
I've been trying all day, I get the general idea, but I don't understand the underlined part.
To be clear, what I don't get is why $$\int_{[0,1]}\psi dm\leq\int_{[0,1]}\phi dm$$ implies $$\inf_{f\leq\phi}\int_{[0,1]}\phi dm=\inf_{f\leq \psi\leq M}\int_{[0,1]}\phi dm$$
It would be really helpful if someone explained what theorems, definitions, or reasoning are being used in those underlined parts.
Thanks in advance.

You do not need any theorems here. In measure theory equalities are often proven by proving the $\le$ and $\ge$ cases separately. I'll write $\int f$ for $\int_{[0,1]}fdm$ here for short.
Just before you start, make sure you 100% understand these claims:
Now apply both bullets, in both cases $\le$ and $\ge$:
For $\le$, to prove $\inf_{f\le\varphi}\int \varphi \le \inf_{f\le\psi\le M}\int \psi$ means to prove (by the first bullet) $$\inf_{f\le\varphi}\int \varphi \le \int \psi$$ for any $\psi$ with $f\le\psi\le M.$ The infimum in the LHS is smaller than $\int\varphi$ for any $\varphi\ge f$, and in particular for $\varphi:=\psi$ because we just assumed $f\le \psi$. Hence by the second bullet we're done.
For $\ge$, to prove $\inf_{f\le\varphi}\int \varphi \ge \inf_{f\le\psi\le M}\int \psi$ means to prove (by the first bullet) $$\int\varphi \ge \inf_{f\le\psi\le M}\int \psi$$ for any $\varphi\ge f$. But as discussed in the previous line in your screenshot, given some $\varphi\ge f$, one can always find a $\psi\le\varphi$ with $f\le\psi\le M.$ With the given $\varphi$ and the $\psi$ found, the inequality is established (by the second bullet): $$\int\varphi \ge \int \psi \ge \inf_{f\le\psi\le M}\int \psi$$
Since each inf is both $\ge$ and $\le$ than the other, they must be equal.