I'm surprised that none of the other answers pointed out the most important point in your question:
Obviously, this logic can be applied to any real numbers, but does it also apply to complex numbers?
This attitude is the right way to go. The logic you speak of is more precisely:
$x^{ab} = (x^a)^b$ for any real number $x$ and natural numbers $a,b$.
If you want the more general fact for integer exponents:
$x^{ab} = (x^a)^b$ for any real number $x \ne 0$ and integers $a,b$.
In fact it turns out that 'miraculously' we have an even more general fact for real exponents:
$x^{ab} = (x^a)^b$ for any real number $x > 0$ and reals $a,b$.
Notice that all these precise statements about real exponentiation show you clearly that you must know exactly what the objects are before you can apply any operations to them, not to say claim any properties about the resulting values.
For this reason it is actually an important question to ask whether there are corresponding rules for complex numbers.
Yes, but not as nice.
$x^{ab} = (x^a)^b$ for any complex number $x \ne 0$ and integers $a,b$. (*)
Here exponentiation is simply the result of starting from $1$ and repeatedly multiplying/dividing by $x$ where the number of times is specified by the exponent (multiplying for positive; dividing for negative). This fact holds in any structure that has invertible multiplication, including the field of rationals, the field of reals, and the field of complex numbers.
$x^{ab},x^a$ are well-defined since $x \ne 0$.
However, in general "$x^{ab} = (x^a)^b$" does not hold for complex $x$ even if $a,b$ are both rational. For instance (according to standard conventions):
$i = (-1)^{1/2} = (-1)^{(2 \times 1/4)} \ne ((-1)^2)^{1/4} = 1^{1/4} = 1$.
So it's excellent that you ask whether some new structure (complex numbers) have the same properties as some other structure (real numbers) instead of just blindly assuming it does.
The question was recently edited to ask for including an explanation of (*). Actually, there is nothing much to explain intuitively, since it boils down to the fact that an $ab$-fold repetition of an operation is the same as a $b$-fold repetition of an $a$-fold repetition of that operation. One can either stop there, but if one wants to ask why then one would need to fix a foundational system first, and in particular the rules concerning integers and induction/recursion. The below proof will use associativity of integer addition and multiplication, and distributivity of multiplication over addition for integers, which correspond to basic facts about repetition.
Suppose we have a field $S$ (such as the complex numbers) and an exponentiation operation that satisfies the following:
$
\def\lfrac#1#2{{\large\frac{#1}{#2}}}
$
$x^0 = 1$ for every $x \in S$.
$x^{k+1} = x^k x$ for every $x \in S$ and integer $k$.
Note that any reasonable foundational system is capable of defining such an operation recursively (you need one direction for positive $k$ and another for negative $k$), and can easily prove by induction the following two theorems.
$x^{a+b} = x^a x^b$ for every nonzero $x \in S$ and integers $a,b$.
Take any nonzero $x \in S$ and integer $a$.
Then $x^{a+0} = x^a = x^a x^0$.
Given any integer $b$ such that $x^{a+b} = x^a x^b$:
$x^{a+(b+1)} = x^{(a+b)+1} = x^{a+b} x = ( x^a x^b ) x = x^a ( x^b x ) = x^a x^{b+1}$.
$x^{a+(b-1)} = x^{(a+b)-1} = x^{a+b} \div x = ( x^a x^b ) \div x = x^a ( x^b \div x ) = x^a x^{b-1}$.
Therefore by induction $x^{a+b} = x^a x^b$ for every integer $b$.
$x^{ab} = (x^a)^b$ for every nonzero $x \in S$ and integers $a,b$.
Take any nonzero $x \in S$ and integer $a$.
Then $x^{a \times 0} = x^0 = 1 = (x^a)^0$.
Given any integer $b$ such that $x^{ab} = (x^a)^b$:
$x^{a(b+1)} = x^{ab+a} = x^{ab} x^a = (x^a)^b (x^a) = (x^a)^{b+1}$.
$x^{a(b-1)} = x^{ab-a} = x^{ab} \div x^a = (x^a)^b \div (x^a) = (x^a)^{b-1}$.
Therefore by induction $x^{ab} = (x^a)^b$ for every integer $b$.
Notice that we did not use commutativity here, which in fact shows that the argument holds in any division ring. If you restrict the exponents to natural numbers, then it clearly holds in any group when "nonzero" is deleted.
Finally, there are some nice properties that arise from the above properties such as:
$i^{k+4} = i^k i^4 = i^k (i^2)^2 = i^k (-1)^2 = i^k$ for any integer $k$.
In short, powers of $i$ (a square-root of $-1$ in the complex field) are cyclic.