Infinitely many primes in the ring of integers for any quadratic field
I suspect you may have mistyped the question, or your professor may not have thought through his or her question carefully enough! Perhaps you are meant to be dealing with prime ideals, not elements?
That said, the result is true, and can be proved at a pretty elementary level, although I think that would be pretty hard for a homework problem. Here are some hints towards the most elementary proof I can think of, followed by some more thoughts.
(1) Let $R$ be a commutative ring and $p$ an element of $R$ such that $R/pR$ is an integral domain. Show that $p$ is prime. (I'm not sure what definition of a prime element you are working with, but this one should be equivalent to it.)
(2) Let $p$ be an odd prime such that $d$ is not square in $\mathbb{Z}/p \mathbb{Z}$. Show that $\mathcal{O}_K/(p \mathcal{O}_K)$ is isomorphic to the field with $p^2$ elements. In particular, $p$ is prime in $\mathcal{O}_K$.
We have now reduced to showing that there are infinitely many primes $p$ such that $d$ is not square modulo $p$.
(3) Show that there is an element $r$ in $\mathbb{Z}/(4d)\mathbb{Z}$, relatively prime to $4d$ such that, if $p \equiv r \mod 4d$ then $d$ is not a square modulo $p$.
Now, I don't know whether or not you are allowed to quote Dirichlet's theorem in your course. If you are, you are done. If not, I do know an elementary proof that there are infinitely many primes $p$ of $\mathbb{Z}$ such that $d$ is not a square modulo $p$, but I'd rather not write it out until I know you need it.
I worry that what I have written above may give you the wrong impression, that prime elements of $\mathcal{O}_K$ come from primes $p \in \mathbb{Z}$ for which $d$ is not square. That is only half the truth.
To make my life simple, let $p$ be relatively prime to $2d$.
If $d$ is not a square modulo $p$, then $\mathcal{O}_K/p \mathcal{O}_K$ is isomorphic to $\mathbb{F}_{p^2}$, as I discussed already. If $d$ is a square modulo $p$, then $\mathcal{O}_K/p \mathcal{O}_K \cong \mathbb{F}_p \oplus \mathbb{F}_p$. So $p$ is not prime.
The ideal $(p)$ factors as $\pi_1 \pi_2$, where $\pi_1$ and $\pi_2$ are prime ideals. It may or may not happen that $\pi_i$ is a principal ideal; if $\pi_i$ is principal, then its generator is a prime element of $\mathcal{O}_K$. What happens is that there is a finite group $H_K$, called the ideal class group, and $\pi$ represents an element of this group. The ideal $\pi$ is principal if and only if the corresponding element of $H_K$ is trivial.
It is in fact true that every element of $H_K$ is represented by $\pi$ for infinitely prime ideals $\pi$ of $\mathcal{O}_K$, and this is still true when we are dealing with "split primes", which in this case means prime ideals $\pi$ coming from a prime $p$ for which $d$ is square.
I worked out the particular case of $\mathbb{Q}(\sqrt{-23})$ in an earlier answer. But I don't know a general proof that every ideal class is represented by infinitely many prime ideals without going through class field theory.
Remember that an element $\pi\in\mathcal{O}_K$ is a prime element if and only if for every $\alpha,\beta\in\mathcal{O}_K$, if $\pi$ divides $\alpha\beta$, then it divides either $\alpha$ or $\beta$.
Question. Are there any rational primes $p$ that are also primes in $\mathcal{O}_K$? If so, what are they? How many are there?
If the question has an affirmative answer and there are infinitely many such primes, then you'll be done. So let's consider what happens to a rational prime in $\mathcal{O}_K$.
We may assume that $d$ is not merely not a perfect square, but in fact squarefree, because if $d=r^2s$, then $\mathbb{Q}(\sqrt{d}) = \mathbb{Q}(\sqrt{s})$.
Consider the "norm map" $N\colon K\to\mathbb{Q}$ given by $$N(r+s\sqrt{d}) = (r+s\sqrt{d})(r-s\sqrt{d}) = r^2 - ds^2,\quad r,s\in\mathbb{Q}.$$ This map is multiplicative: if $\alpha,\beta\in\mathbb{K}$, then $N(\alpha\beta)=N(\alpha)N(\beta)$. Also, since $r+s\sqrt{d}$ satisfies the polynomial $$\Bigl( x - (r+s\sqrt{d})\Bigr)\Bigl(x - (r - s\sqrt{d})\Bigr) = x^2 - 2rx + (r^2-ds^2),$$ then $r+s\sqrt{d}\in\mathcal{O}_K$ if and only if $2r$ and $r^2 - ds^2\in\mathbb{Z}$.
This means that $r$ is either an integer or a half integer; if $r$ is an integer, then $ds^2$ must be an integer, hence $s$ must be an integer (since $d$ is squarefree). If $r$ is a half integer, $r = \frac{a}{2}$ with $a$ odd, then it is not hard to show that you must have $d\equiv 1 \pmod{4}$, and $s$ must also be a half integer.
It also means that we can translate statement about divisibility in $\mathcal{O}_K$ into statements about divisiblity in $\mathbb{Z}$, through the use of the map $N$. If $\alpha$ divides $\beta$ in $\mathcal{O}_K$, then $N(\alpha)$ has to divide $N(\beta)$ in $\mathbb{Z}$.
Now, suppose $p$ is a rational prime, and that $p$ divides a product $$\left( a + b\sqrt{d}\right)\left(x+y\sqrt{d}\right).$$ We want to know under what conditions we can conclude that $p$ divides either $a+b\sqrt{d}$ or $x+y\sqrt{d}$.
Since $p$ divides the product, that means that $N(p)= p^2$ divides the norm of the product, that is, $p^2$ divides $$N\left(\left(a+b\sqrt{d}\right)\left(x+y\sqrt{d}\right)\right) = N\left(a+b\sqrt{d}\right)N\left(x+y\sqrt{d}\right) = (a^2-db^2)(x^2-dy^2).$$ Since each of $a^2-db^2$ and $x^2-dy^2$ are integers, and $p^2$ divides the product, then $p$ must divide one of the factors. Without loss of generality, say that $p|a^2-db^2$.
Say $a$ and $b$ are both integers (think about the case where they are both half integers on your own later). Consider some possibilities:
If $p$ divides $b$, then it must divide $a$, and that means that $p$ divides $a+b\sqrt{d}$ and we are done.
If $p$ divides $a$, then it must also divide $db^2$, so it either divides $d$ or it divides $b$.
- If $p$ does not divide $d$, then it must divide $b$, and again we are done, since it divides both $a$ and $b$, hence it divides $a+b\sqrt{d}$.
If $p$ does not divide any of $a$, $b$, or $d$, then $a^2\equiv db^2\pmod{p}$, and since all of the factors are relative prime to $p$, that means that $d$ is a quadratic residue modulo $p$.
In summary: either $p$ divides $d$; or else $d$ is a quadratic residue modulo $p$; or else $p$ has to divide one of $a+b\sqrt{d}$ or $x+y\sqrt{d}$.
That is: if $p$ does not divide $d$, and $d$ is not a quadratic residue modulo $p$, then $p$ is a prime element of $\mathcal{O}_K$.
(This was under the assumption that $a$ and $b$ were integers; if they are both half integers, you'll get a similar conclusion).
So, the question now becomes:
Question (modified): Are there any rational primes $p$ for which $d$ is not a quadratic residue modulo $p$? How many?
Show there's infinitely many such primes for any given $d$. This (together with the completed argument given above) will show that there are infinitely many primes in $\mathcal{O}_K$, namely, at least as many as there are rational primes for which $d$ is not a quadratic residue.
Note that these are not all the prime elements in $\mathcal{O}_K$, though; for some primes $p$ that do not divide $d$ and for which $d$ is a quadratic residue, you get two prime elements of $\mathcal{O}_K$ that are not rational primes, for instance (infinitely many primes for sure, sometimes all such primes).