What's the difference between "relation", "mapping", and "function"? I think that a mapping and function are the same; there's only a difference between a mapping and relation. But I'm confused. What's the difference between a relation and a mapping and a function?
Mathematically speaking, a mapping and a function are the same. We called the relation 
$$
f=\{(x,y)\in X\times Y : \text{For all $x$ there exists a unique $y$ such that $(x,y)\in f$} \}
$$
a function from $X$ to $Y$, denoted by $f:X\to Y$. A mapping is just another word for a function, i.e. a relation that pairs exactly one element of $Y$ to each element of $X$.

In practice, sometime one word is preferred over another, depending on the context.

The word mapping is usually used when we want to view $f:X\to Y$ as a transformation of one object to another. For instance, a linear mapping $T:V \to W$ signifies that we want to view $T$ as a transformation of $v\in V$ to the vector $Tv\in W$. Another example is a conformal map, which transforms a domain in $\Bbb C$ to another domain.

The word function is used more often and in various contexts. For example, when we want to view $f:X\to Y$ as a graph in $X\times Y$.
Good question. I can give you a simple example. 


  You can generally think of relations as functions in a higher dimensional space, intersected with a zero plane.


So for example, lets take a parabola and a circle to demonstrate this. Imagine the parabola

$$ f(x) = x^2 + 3x $$

This is clearly a function of x, because if you give me an x value, I can give
you the corresponding value of f(x) - a mapping is really just another name
for a function. If we want to graph it, we can let the y value 
equal the output of $f$, so we would get this graph:



On the other hand, if we graph a circle, like:

$$x^2+y^2=4$$

Its graph is given by:



Now this is fundamentally different to the function. If you wanted the y value at x = 0,
I can't point to a unique value, I'd have to say y = 2 or y = -2. A function can only
have one output. So we have to call this a relation.

Higher Dimensions

However, we can use a clever trick for this circle. We can rewrite it as:

$$ x^2 + y^2 - 4 = 0 $$

Which is obviously the same thing, but on the left hand side, notice that we now
have a function of (x,y), so we can think of this like:

$$ g(x, y) = 0 $$

In a higher dimension, this would be the intersection between the shapes:

$$ z = g(x, y) $$

and

$$ z = 0 $$

Which I've shown below:



Notice that same circle hiding in plain sight.

Key takeaway (tl;dr)


  Relations are functions in a higher dimension, intersected with a zero plane
  in the higher dimension.


(Edit) More Precisely

I agree that I could have been more precise with the things I've written above. So hopefully I can be more clear by what I meant here. The usual definition is:


  A relation is a pairing between elements of two sets, which are not necessarily unique. A function forces each member of the domain to have only one "partner" in the output set (or codomain).


So for example, here are two example sets. On the left we have a relation that is a function, and on the right we have a relation that is not a function.



However, under a particular circumstance (that I will discuss below), we can actually turn that relation into a function. First, we can take the cartesian product between the two sets X and Y on the right portion of the image above as shown, this will produce every possible pair of tuples (x, y):



Now under the assumption that there exists another function to map these tuples to another set z, (which is the role of z = g(x, y) and z = 0 = 0(x, y) (using zero as a function name), the relation can be viewed as a function that maps all of these tuples into the same point as I've shown below: 



Now of course, the reason I bothered to subtract everything to have zero on the other side, was so that the element on the output set that I was mapping to was 0 in the set of real numbers.

However, I am assuming that there exists a function $g(x, y)$, to map from $X \times Y$ to $Z$, which at least for a function of real numbers to real numbers; should always be true. 

I hope this clears things up. I appreciate your comments :)