When the discriminant is $-k$ or ${-1\over k}$:
As long as $-1$ and $k$ are both squares $\bmod p$ (trivial) or are both not squares, there are solutions mod $p$. How can this be explained/proven?
e.g.:
$x^2+x+1$ has a discriminant $-3$ and has solutions mod $p$ when $p \equiv (1 \bmod 6)$, which includes $p \equiv (7 \bmod 12)$ where neither $3$ nor $-1$ are squares.
Let's work with an odd prime $p$, and consider the quadratic $a x^2 + b x + c = 0$, where $a \not\equiv 0 \bmod p$. "Completing the square" writes this as $$ a \left(\left(x + \frac{b}{2a} \right)^2 - \frac{b^2-4 a c}{4a^2}\right) = 0 $$ so there are solutions if and only if $b^2 - 4 a c$ is a quadratic residue (i.e. a square) $\bmod p$.
For example, suppose (as for $x^2 + x + 1$ the discriminant $b^2 - 4 a c = -3$. For what primes is that a quadratic residue? Note that $-3$ is a quadratic residue mod $p$ (a prime $> 3$) iff either $-1$ and $3$ are both residues or both nonresidues (the product of two quadratic residues or two nonresidues is a residue, while the product of a (nonzero) residue and a nonresidue is a nonresidue). By the first supplement to the law of quadratic reciprocity, $-1$ is a residue mod $p$ iff $p \equiv 1 \mod 4$. By quadratic reciprocity, $3$ is a residue mod $p$ iff $p \equiv -1$ or $1 \bmod 12$. The conclusion is that $-3$ is a residue if $p \equiv 1 \bmod 3$ and a nonresidue if $p \equiv 2 \bmod 3$.