Intuitively, onto real valued functions have graphs such that the graph crosses every point on the y-axis.
But some complex function are also onto, e.g. non-constant polynomials with complex coefficients are onto, and I am struggling with the intuition behind this
Q1
If a complex function is onto, then it equals every point in the complex plane at some point. But then how is it a function? Wouldn't that mean it has infinitely many zeros? (basically, what does this function "look like"? We always compare complex values to the real $x,y$-plane, so using this logic the output of the function can be viewed as the entire $x,y$-plane.)
Q2
Also, since real valued functions are a subset of complex valued functions, does this mean that real valued function can be onto in the complex plane?
Q3
Somewhate related to this last point, I know every complex function has a power series and not every real valued function. But real valued functions are a subset of complex valued functions, so do all real valued functions have complex power series?
Q1. $f(z) = z$ is an obviously surjective ("onto") function from $\Bbb C \to \Bbb C$. It has only one root $z = 0$. It is also obviously a function: each value of $z$ put into $f$ gives only one output.
More generally, since multiplication, addition, and subtraction are well-defined on the complex numbers, any polynomial $p(z)$ is a function from the complex numbers to the complex numbers. It is a function because it meets the requirement to be a function: if $w = z$, then $p(w) = p(z)$. That is, if you put the same input into the function again, you will always get the same output out of the function.
By the fundamental theorem of algebra, if $p(z)$ is not constant, then it is surjective. Also by the fundamental theorem of algebra, the number of roots of $p(z)$ is $\le$ its degree, which is finite.
Note that this includes both polynomials with complex coefficients: $$p(z) = (1+i)z^3 + (2-2i)z - 3-5i$$ and polynomials with real coefficients $$p(z) = z^2 + 4$$
If we restrict the latter polynomial to only real values for the input $$p(x) = x^2 + 4$$ then we only get real values out of it, and it becomes a real polynomial. Real polynomials do not necessarily have roots. This particular example does not. When someone refers to a real polynomial as having a complex root, what they are actually talking about is not the real polynomial, but its complex twin $p(z) = z^2 + 4$.
We could also restrict the first example to only real numbers: $$p(x) = (1+i)x^3 + (2-2i)x - 3-5i$$ but since the output values are not also real, it still doesn't qualify as a real polynomial. $p(z)$ is surjective, but its restriction $p(x)$ is not. The image of $p(x)$ will be a curve in the complex plane.
Q2. Obviously not. To say a function $f$ is "real-valued" is to say that $f(z) \in \Bbb R$ for every $z$ in the domain of $f$. Since most complex numbers are not in $\Bbb R$, this means that $f$ will never have them as a value. So it cannot be surjective.
Now, I am interpreting your question to mean a function $f : U \to \Bbb C$ for some set $U \subseteq \Bbb C)$, such that the image of $f, f(\Bbb C) \subseteq \Bbb R$. So the image, a subset of $\Bbb R$, cannot be the entire codomain $\Bbb C$.
Brevan Ellefson interpreted it to mean a function $f: U \to \Bbb R$, which is why his answer differs from mine. It is up to you to decide which (if either) of us correctly interpreted your question. But within our own interpretations, both of our answers are correct (even if not all of his examples qualify).
Q3. As Brevan has already indicated, it is not true that every complex function has a power series. This is only true of complex functions that have a derivative on some neighborhood of a point. This is actually only a very small subset of all possible complex functions. It is an extremely useful and powerful set of functions, so we devote a lot of attention to them, but the vast majority of functions are not even continuous, much less differentiable. For example, we could define $$f(x + iy) = \begin{cases} (x + iy)^2,&x,y\text{ both rational}\\0,&\text{ otherwise}\end{cases}$$ This function is continuous only at $0$. Oddly enough, it is even differentiable at $0$.
If we restrict ourselves to functions (real or complex) that are infinitely differentiable everywhere they are defined, then we can address your question.
Every such complex function has a Taylor series that is equal to it. In fact, if a complex function $f$ is differentiable in some neighborhood of a point $p$, then $f$ is infinitely differentiable in that neighborhood, and its Taylor series will converge everywhere in that neighborhood to $f$. Note that differentiability at just $p$ is not enough. The function I defined above is differentiable at $0$, but is not even twice differentiable, much less having a Taylor series.
For real functions, the situation is not as nice. A function can be infinitely differentiable, but its Taylor series might have radius of convergence $0$ ($\sum_n n!x^n$ is an example). Or the Taylor series could converge, but not to the function. The classic example of this is the function $f(x) = e^{-1/x^2}, x \ne 0; f(0) = 0$. Its Taylor series at $x = 0$ is the constant function $0$.
When a real function $f$ has a Taylor series that converges to itself, then $f$ is in fact the restriction of a complex analytic function to a subset of the real line. In fact, if $$f(x) = \sum_n a_n(x - p)^n$$ for $|x - p| < r$, then we can simply allow the variable to take on complex values as well. $\sum_n a_n(z - p)^n$ will converge for any complex $z$ inside the same radius of convergence $|z - p| < r$. This allows us to extend the domain of $f$ to the complex numbers by means of the power series: $$f(z) := \sum_n a_n(z - p)^n$$
So, no, a real function without a converging Taylor series will not have a complex Taylor series either. Instead a real function with a converging Taylor series can be considered as the restriction of an analytic complex function to the real numbers.