Show that a continuous function has a fixed point
Let $g(x) = f(x) - x$. Then $g$ is continuous and $g(a) \geq 0$ while $g(b) \leq 0$. By the Intermediate Value Theorem, $g$ has at least one zero on $[a, b]$.
Consider $g(x)=f(x)-x$. $f(a)\ge a$ so $g(a)=f(a)-a\ge 0$. $f(b)\le b$ so $g(b)=f(b)-b\le 0$. By the Intermediate Value Theorem, since $g$ is continuous and $0\in[g(b),g(a)]$ there exists $c\in[a,b]$ such that $g(c)=f(c)-c=0$, so $f(c)=c$ for some $c\in[a,b]$.
For a different approach then the ones above, let us take $a = 0$ and $b = 1$. So assume $f:[0,1] \to [0,1]$ has no fixed point. Then $[0,1] = \{x \in [0,1] : f(x) < x\} \cup \{x \in [0,1] : f(x) > x \}$. Now argue that this is not possible.