The constructions of complex number that you must have seen rely on people's intuitions and experience with arithmetic, in order to avoid certain formalities that are deemed too confusing or too demotivating for most people. However, if one is very careful, one discovers that they do not hold water, just like you did: how can we define $\sqrt{\phantom{x}}$ using $i$ and the same time define $i$ using $\sqrt{\phantom{x}}$? If that's not what we do, then what is $i$? (Another dilemma that sometimes arises is: thee are two square roots of $-1$, how do we know which one is $i$?)
The answer thar resolves the problems was already given by infinitylord, but they perhaps did not put the right emphasis on it to get through to you. So let me spell out the logical steps of the construction of $\mathbb{C}$.
Before we do that, you must forget all the talk about $i = \sqrt{-1}$ and such. All of that is just motivation and is not part of an actual, precise construction (even though many pre-university texts will pretend it is).
So, with a blank mind:
- We define $\mathbb{C} = \mathbb{R} \times \mathbb{R}$. That is, a complex number is a pair of real numbers.
- We define operations on complex numbers:
- $(x,y) +_\mathbb{C} (u,v) = (x + u, y + v)$
- $(x,y) -_\mathbb{C} (u,v) = (x - u, y - v)$
- $(x,y) \cdot_\mathbb{C} (u,v) = (x \cdot u - y \cdot v, x \cdot v + y \cdot u)$
- We prove that with these operations $\mathbb{C}$ is a field.
Observe that we never mentioned square roots or $i$ to construct $\mathbb{C}$.
Now we define $i = (0,1)$. Still, we have not mentioned any square roots.
For historical reasons people use the following notational conventions:
For any real number $x \in \mathbb{R}$, we are allowed to write $x$ instead of $(x,0)$. The reader is supposed to guess whether $x$ is to be read as a real or as $(x, 0)$.
We write $+$, $-$, $\cdot$ for operations on reals and for operations on complex numbers, even thought they are different things. The reader is supposed to guess what is going on.
For example, if I write $2 + 3 \cdot i$ you are supposed to guess that this means
$$(2,0) +_\mathbb{C} (3,0) \cdot_\mathbb{C} (0,1),$$
after which you can compute easily that the complex number in question is $(2, 3)$.
For any real numbers $x$ and $y$ we have $(x, y) = (x, 0) +_\mathbb{C} (y, 0) \cdot_\mathbb{C} (0,1)$, which we could write using the above conventions as $(x,y) = x + y \cdot i$. For historical reasons nobody writes $(x, y)$, and everyone prefers $x + y \cdot i$. But keep in mind that this is only possible because of the above conventions.
Textbooks skip over this explanation and just tell you that "every complex number has a real component $x$ and an imaginary component $y$, and can therefore be written as $x + i y$". The problem with this is that it confuses those who are smart enough (and the rest could not care less).
Now the definition of $\sqrt{\phantom{x}}$ is not mysterious at all. We defined $i$ without any mention of square roots, so we are free to mention $i$ when we define square roots.
I hope this clears up the confusion.
Addendum: Apparently confusion has not been cleared up. As my last attempt, I will define square root of a complex number. While doing so, we can use square roots of non-negative reals (but not of negative reals). Define the map $s : \mathbb{C} \to \mathbb{C}$ by the rule (we continue to write complex numbers as pairs of reals):
$$
s(x,y) =
\begin{cases}
\left(\sqrt{\frac{\sqrt{x^2+y^2}+x}{2}},-\sqrt{\frac{\sqrt{x^2+y^2}-x}{2}}\right)& \text{if $y < 0$}\\
(0, \sqrt{-x})& \text{if $y = 0$ and $x < 0$}\\
(\sqrt{x}, 0)& \text{if $y = 0$ and $x \geq 0$}\\
\left(\sqrt{\frac{\sqrt{x^2+y^2}+x}{2}},\sqrt{\frac{\sqrt{x^2+y^2}-x}{2}}\right)& \text{if $y > 0$}
\end{cases}
$$
Note that all square roots in the definition of $s(x,y)$ are applied to non-negative real numbers (in particular $\sqrt{x^2+y^2}-x \geq 0$).
Theorem: For all $(x,y) \in \mathbb{C}$ we have $s(x,y) \cdot s(x,y) = (x,y)$.
Proof. This requires some calculation that I am not going to write down (I checked with Mathematica). Let us just see what happens when $x < 0$ and $y = 0$ (again, note that the numbers appearing under square roots are all non-negative reals):
\begin{align*}
s(x,0) \cdot s(x,0) &=
(0,\sqrt{-x}) \cdot (0,\sqrt{-x}) \\ &=
(0 - \sqrt{-x} \cdot \sqrt{-x}, 0 \cdot \sqrt{-x} + \sqrt{-x} \cdot 0) \\ &= (0 - (-x), 0) \\ &= (x, 0).
\end{align*}
as required. QED.
We define the square root of a complex number to be $\sqrt{(x,y)} = s(x,y)$.
We calculate that $\sqrt{-1} = \sqrt{(-1,0)} = s(-1,0) = (0,\sqrt{-(-1)}) = (0, \sqrt{1}) = (0, 1) = i$.