That is quite an interesting question, most people never ask themselves what that means...
The answer by Michael Hoppe is correct, but consider for example $2^\pi$, what does it mean ? Now we can't use Michael's method because we can't write $\pi$ as a rational number, that's we can't write $\pi = \frac{p}{q}$, now what ?
There is quite an interesting solution to this, as
$$\pi = 3.14159265359...$$
we can write, for example, $$\pi \approx \frac{314159}{100000}$$
that is a very good approximation to $\pi$, and now we can use Michael's method!
Ok, that is an "intuitive" answer, but the fact is that we define $2^\pi$ as the limit of the sequence $2^{\frac{p}{q}}$ as $\frac{p}{q}$ approaches $\pi$.