I just want to know if there is a mistake in my text book.
The proof from my textbook is as follows:
For any real number $a \in \mathbb{R} $ we have $-\lvert a \rvert \leq a \leq \lvert a \rvert$.
Proof. [...] When $a < 0$ then $a < 0 < \lvert a \rvert $, showing that $a \leq \lvert a \rvert$, while $-\lvert a \rvert = -(-a) = a$ [...]
I don't understand the last part regarding $-\lvert a \rvert = -(-a) = a $.
If $ a = -4 $, for example, would it not be $-\lvert -4 \rvert = -\lvert 4 \rvert = -4$?
The example you gave does not contradict the book and the book is correct.
If $a<0$, then
$$-\lvert a \rvert = -(-a) = a $$
This is correct by definition of absolute value. Because,
$$|a|=a, \thinspace a≥0\iff -|a|=-a$$
For $ a = -4 $, you wrote
$$-\lvert -4 \rvert = -\lvert 4 \rvert = -4$$
That is correct. But, note that here we don't need to write $|4|$ here. Because, $|-4|=4$ by definition of absolute value. Thus, we can write
$$-|-4|=-4$$
By definition of absolute value we can also write,
$$|a|≥a ~~\text{and}~~ |a|≥-a$$
This immediately implies, we have
$$-|a|≤a≤|a|.$$
This comes from,
$$\begin{align}&a≥0\\ \iff &-a≤0≤a\\ \iff &|a|=a≥a≥-a\end{align}$$
and
$$\begin{align}&a<0\\ \iff&-a>0>a\\ \iff& |a|=-a≥-a>a.\end{align} $$