Let $K=\mathbb{Q}(\sqrt{-7})$, so that $\mathcal{O}_K=\mathbb{Z}[\frac{1+\sqrt{-7}}{2}]$ because $-7\equiv 1\bmod 4$. Let $(8)$ denote the ideal generated by $8$ in $\mathcal{O}_K$.
Because $(8)=(2)^3$, it will suffice to determine the factorization of $(2)$ in $\mathcal{O}_K$, and then the factorization of $(8)$ will be the same with the exponents multiplied by $3$.
Note that $$(\tfrac{1+\sqrt{-7}}{2})(\tfrac{1-\sqrt{-7}}{2})=(2).$$
The norm of $\frac{1+\sqrt{-7}}{2}$ is $$N\mathopen{\big(}\tfrac{1+\sqrt{-7}}{2}\mathclose{\big)}=\mathopen{\big(}\tfrac{1}{2}\mathclose{\big)}^2+7\mathopen{\big(}\tfrac{1}{2}\mathclose{\big)}^2=2,$$ and similarly with $\frac{1-\sqrt{-7}}{2}$, so that $\mathcal{O}_K/\mathopen{\big(}\frac{1+\sqrt{-7}}{2}\mathclose{\big)}$ and $\mathcal{O}_K/\mathopen{\big(}\frac{1-\sqrt{-7}}{2}\mathclose{\big)}$ have cardinality $2$, and they are therefore the field $\mathbb{F}_2$.
Thus the ideals $\mathopen{\big(}\frac{1+\sqrt{-7}}{2}\mathclose{\big)}$ and $\mathopen{\big(}\frac{1-\sqrt{-7}}{2}\mathclose{\big)}$ are prime, so that
$$(8)=\mathopen{\big(}\tfrac{1+\sqrt{-7}}{2}\mathclose{\big)}^3\mathopen{\big(}\tfrac{1-\sqrt{-7}}{2}\mathclose{\big)}^3.$$
To see how this works, it's most simple to appeal to the norm and the concept of "ramification." The most likely reason this was glossed over in your text is that you probably haven't proven these theorems yet, and I agree it's not immediately obvious why it's true otherwise.
So first let me start with the statement of Dedekind's Discriminant Theorem
Let $K/\Bbb Q$ be a finite field extension with ring of integers $\mathcal{O}_K$. Then the ideal $p\mathcal{O}_k$ is ramified iff $p|\Delta_K$, the discriminant of $K$.
Then since we know for quadratic fields, $K=\Bbb Q(\sqrt{m})$ with $m$ square-free that
$$\Delta_K=\begin{cases} m & m\equiv 1\mod 4 \\ 4m & m\equiv 2,3\mod 4\end{cases}.$$
Now, $-5\equiv 3\mod 4$ so that with $K=\Bbb Q(\sqrt{-5})$ we have $\Delta_K=-20$. Then we know that when we factor $(2)$ into prime ideals we have
$$(2)=\mathfrak{p}_1^{e_1}\ldots\mathfrak{p}_r^{e_r}$$
with some $e_i>1$. Since $N((2))=N(2)=4$ we see that $N(\mathfrak{p}_i)|4$, i.e. $N(\mathfrak{p}_i)\in\{2,4\}$. Assume WLOG $e_1>1$. Then $N(\mathfrak{p}_1^{e_1})>N(\mathfrak{p}_1)^2\ge 4$. So it must be that $e_1=2$ and $N(\mathfrak{p}_1)=2$, since any larger and the norm of the product is bigger than $4$, which is impossible. But then if we have some other prime $\mathfrak{p}_2$ in that factorization, i.e. $r>1$ then $N(\mathfrak{p}_2)\ge 2$ so that the norm of the product is at least $8$, impossible. So we conclude there is but one prime above $2$.
Now how do we conclude based on similar information that there are two primes (and no more) above $3$? Well, first we'd like to know that the ideals are actually above $3$.
In number theory if we have two integer rings $\mathcal{O}_K\subseteq\mathcal{O}_L$ the phrase "$\mathfrak{P}$ lies above $\mathfrak{p}$" means that $\mathfrak{p}\mathcal{O}_L=\mathfrak{P}^{e}\cdot\mathfrak{a}$ for some ideal $\mathfrak{a}\subseteq\mathcal{O}_L$. That is: $\mathfrak{P}$ appears in the prime factorization of the ideal $\mathfrak{p}\mathcal{O}_L\subseteq\mathcal{O}_L$.
In your case we can see that both of the given primes are indeed "above" $3$, so it suffices to see that there can be no more. Again, noting
$$(3,1+\sqrt{-5})(3,1-\sqrt{-5})|(3)$$
We see that $N((3,1\pm\sqrt{-5}))|N(3)=9$. But then if there are more primes in the factorization of $(3)$ we would get too big of a norm again, so there are at most $2$ primes above $3$, hence exactly $2$.
The same logic goes through other ideals, you can see the same construction works for all primes since their norms are squares, so there are always at most $2$ in a quadratic extension. Proving there are $2$ usually amounts to providing $2$ distinct ideals, proving there is only $1$ in the ramified case (i.e. primes dividing the discriminant) is exactly the same, and then for the others for which there is only one prime, but it is not ramified, things can get a bit trickier, and is usually more ad-hoc (unless you know a suitably advanced form of quadratic reciprocity).
Best Answer
There are several ways to deduce that these are ideals are prime. The easiest might be to just compute the quotient:
$$\mathbb Z[\sqrt{-5}]/(2,1+\sqrt{-5}) \cong \mathbb Z[X]/(X^2+5,2,1+X) = \mathbb Z[X]/(2,1+X) \cong \mathbb Z/2\mathbb Z$$
But you can also use some theory (And this somehow fits to your norm approach). Whenever we have an quadratic integer ring and an integer prime number $p \in \mathbb Z$, then the ideal $(p) \subset \mathcal O_K$ behaves in three ways:
Together with the fact, that there exists a unique prime ideal factorization, we get the following corollary: Whenever we have $(p)=IJ$ for some ideals $I,J$, then $I$ and $J$ are necessarily prime (If one of them would factor into primes, $(p)$ would factor into at least $3$ primes).