What does the function f: x ↦ y mean?

It means that $f$ is a function that takes the value $x$ to the value $y$. For instance, $$f: x\mapsto x^2$$ is an alternate way of writing $f(x) = x^2$.


$f:x \mapsto y$ means that $f$ is a function which takes in a value $x$ and gives out $y$.

But,
$f: \mathbb{N} \to \mathbb{N}$ means that $f$ is a function which takes a natural number as domain and results in a natural number as the result.


As it is evident from math.stackexchange notation — the symbol $\mapsto$ reads as "maps to".
This is backed up by Wikipedia article on functions:

... the notation $\mapsto$ ("maps to", an arrow with a bar at its tail) ...

There is another arrow-symbol, which also used for mapping $\rightarrow$, which might be a bit confusing. The difference between two (as it is mentioned in the linked answer, as well as in the answer by MathEnthusiast):

  • $\mapsto$ maps an element of one set to an element of another set;
  • $\rightarrow$ maps a set to a set.

Example (borrowed from here):

$$f:R \rightarrow R$$ $$x \mapsto x^2$$

It means that: under $f$, any element $x \subset R$ gets mapped to the element $x∗x=x^2$ (which is also an element of $R$).