How can $i^2 = k^2 = j^2 = ijk = -1$ be true?
There is no such thing as $\sqrt{-1}$ in the complex numbers. Don't use that symbol that's not well defined and your understanding of the complex numbers will improve.
While it is possible to define a square root function over the nonnegative real numbers, satisfying the property $\sqrt{a}\sqrt{b}=\sqrt{ab}$ for $a,b\ge0$, there is no function $f$ defined over the complex numbers satisfying
- $f(1)=1$;
- $(f(z))^2=z$, for all $z\in\mathbb{C}$;
- $f(z_1z_2)=f(z_1)f(z_2)$, for all $z_1,z_2\in\mathbb{C}$.
(here $f$ should be the square root).
Thus you can't use the relation $\sqrt{-1}\, \sqrt{-1}=\sqrt{(-1)^2}=\sqrt{1}=1$: you see well this gives an immediate contradiction. But it is only apparent: since no function satisfies the requirements above, you can't use it. Actually, this contradiction is a proof that the above function cannot exist.
Over the quaternions the situation is even more complicated. There are infinitely many quaternions $h$ such that $h^2=-1$.
To wit, consider $h=a+bi+cj+dk$; then \begin{align} h^2 &=(a+bi+cj+dk)(a+bi+cj+dk) \\ &=a^2-b^2-c^2-d^2+2abi+2acj+2adk \end{align} so we get $$ \begin{cases} a=0 \\[4px] b^2+c^2+d^2=1 \end{cases} $$ and the second equation has infinitely many solutions (imagine the unit sphere in three-space). Among these there are indeed $\pm i$, $\pm j$, and $\pm k$.
Don't forget that the quaternions are not commutative, so seemingly mysterious things can happen. They're not mysterious, though: follow the given rules, not those that you think apply.