I'll answer your questions in order.
What exactly does this mapping mean? Well, simply put it means that there is a rule, which we shall define by our function $f$, that returns a value in the codomain for every value in the domain.
So let's define these as well. The domain is the set of objects for which our function takes an argument. But we need to make sense of this in some way. So let's consider some polynomial equation, $P$. First, let $P$ be a function
$$P:\mathbb{R}^2\rightarrow \mathbb{R}$$
It is useful to understand what values your function will take as an argument and which values your function returns as. We say that the function takes argument in the domain. This will always be the first set defined before the arrow in our above function notation. In our specific case, the domain is $\mathbb{R}^2$ which is the set of all ordered pairs $(x,y)$ where $x$ and $y$ are values of $\mathbb{R}$.
The function will return values in of the codomain. This is the set immediately following the arrow. Here, the set is of all real numbers.
Let's define our polynomial as taking the ordered pair $(x,y)$ to the single value $x^2+y^2$. We have notation for this as well; we say $(x,y)\mapsto x^2+y^2$ or the value $(x,y)$ gets mapped to $x^2+y^2$.
To me, it seems a lot of the confusion is coming from what the sets $\mathbb{R}^n$ are for each $n$ a natural number. So let's go over this as well.
It is certainly confusing when we say both $x\in \mathbb{R}^n$ and $x\in \mathbb{R}$. First, we need to make something clear. This is that the element $x$ is to be considered an element of the set. This does not mean $x$ is a variable like usual. It means exactly as you say, $x$ defines a point in the vector space $\mathbb{R}^n$ (or $x$ is an element of the set $\mathbb{R}^n$. This means that $x=(x_1,...,x_n)$ for some $n$, and each $x_i$ is a real number; an element of the set $\mathbb{R}$. Note $n$ can be one).
Perhaps I could provide a better visualization than the one taught with orthogonal real lines as is the norm. Consider the space $\mathbb{R}^n$. As a set, we can imagine this as $n$ copies of the real line $\mathbb{R}$. The real line is just an infinitely long continuous line. Now, for each copy of the real line, there is a point on the line that defines the first coordinate of our point $x$. So for the first line in $\mathbb{R}\times...\times \mathbb{R}$ ($n$ copies) corresponds to the value $x_1$ in $x=(x_1,...,x_n)$. We do this for each line and finally achieve a point in the space $\mathbb{R}^n$, namely, $x=(x_1,x_2,...,x_n)$!
Hopefully this clears some things up but, I encourage you to ask questions if I'm confusing or unclear or more issues arise.
Furthermore, the wiki page on functions is pretty insightful to the defintion. I suggest looking through it if confusion persists!