$$x^4=1$$
First, note that the quaternions are equivalent to the following algebra: $$i^2=j^2=-1,\ ij=-ji.$$ So you effectively have two complex units which anticommute. Then your ordinary quaternions are defined in relation to these as $$\mathbf i\overset{\text{def}}{\equiv}i,\mathbf j\overset{\text{def}}{\equiv}j,\mathbf k\overset{\text{def}}{\equiv}ij.$$ From here you can expand $x$ in its real and "imaginary" parts, $$x=r+\mathbf I$$ which commute, and from their vector multiplication defined by $$q_1q_2=(r_1+\mathbf I_1)(r_2+\mathbf I_2)=\underbrace{(r_1r_2-\mathbf I_1\cdot \mathbf I_2)}_{\in \mathbb R}+ \underbrace{(r_1\mathbf I_2+r_2\mathbf I_1+\mathbf I_1\times \mathbf I_2)}_{\in \mathbb H\setminus \mathbb R}$$ we have the square as $$x^2=r^2-|\mathbf I|^2+2r\mathbf I$$ and the square of this as $$(x^2)^2\equiv x^4=(r^2-|\mathbf I|^2)^2-4r^2|\mathbf I|^2+4r(r^2-|\mathbf I|^2)\mathbf I$$ we have the system $$\begin{align}(r^2-|\mathbf I|^2)^2-4r^2|\mathbf I|^2 &= 1\\ 4r(r^2-|\mathbf I|^2)\mathbf I &= 0\end{align}$$ which leads to a few cases.
Case $r=0$, we have $|\mathbf I|^4=1$ which leads to, if the imaginary part is $\mathbf I=ai+bj+cij,$ $$(a^2+b^2+c^2)^2=1\implies a^2+b^2+c^2=1,$$ a sphere in the imaginary part. The possibility of the RHS being $-1$ is impossible in the quaternions on the assumption of real $a,b,c.$
Case $r\neq 0,\mathbf I\neq 0$. Briefly, in the case $\mathbf I=0,r^4=1\implies x=\pm 1$. Assuming this is not the case, we have $$r^2-|\mathbf I|^2=0$$ by the second equation and so the first becomes $$4r^2|\mathbf I|^2=-1$$ or $$4r^4=-1$$ which is a contradiction since we assumed $r\in\mathbb R.$ We therefore conclude that this case is impossible and the only two solutions are given by $$\boxed{\boxed{x\in\left\{ai+bj+cij\ |\ a^2+b^2+c^2=1\right\}\cup \{1,-1\}}}.$$
$$x^2+1=0$$
Let $x\in\mathbb H$, where $x^2+1=0.$ Decompose $x$ into its real and quaternion part, $$\begin{align}x&=r+a\mathbf i+b\mathbf j+c\mathbf k\\ &= r+\mathbf I,\text{ where }\mathbf I\equiv a\mathbf i+b\mathbf j+c\mathbf k\end{align}.$$ By quaternion vector multiplication, $$x^2=r^2-|\mathbf I|^2+2r\mathbf I,$$ and by the assumption $x^2+1=0,$ we have $$r^2-|\mathbf I|^2+2r\mathbf I=-1$$ or that $$\begin{align}r^2-|\mathbf I|^2&=-1\\ 2r\mathbf I&=0\end{align}.$$ Assume $r\neq 0,$ then $\mathbf I=0$ by the second equation, and $r^2=-1.$ But $r\in\mathbb R$, a contradiction, so it is necessarily the case that $r=0.$ Thus the second equation is redundant and the first becomes $$|\mathbf I|^2=1$$ or that $$a^2+b^2+c^2=1,$$ which is a condition on the point $x=\mathbf I=a\mathbf i+b\mathbf j+c\mathbf k$, or that the solutions to $x^2+1=0$ are given by $$x\in\left\{a\mathbf i+b\mathbf j+c\mathbf k\ |\ a^2+b^2+c^2=1\right\},$$ which is an infinite set, QED.