Even functions are functions that are symmetric about the $Y$-axis, and odd functions are functions that are symmetric about the origin. Functions that are symmetric about $y=x$ ($y=f(x)$ implies $x=f(y)$) are involutions, i.e. functions that are their own inverse.
Is there a special name for functions that are anti-symmetric about $y=x$? In other words, is there a name for the property: If $y=f(x)$ and $x=f(y)$ then $x=y$? The word anti-involution seems to be in use, but according to Wikipedia it has a rather technical definition in terms of antihomomorphisms and doesn't seem to be what I'm looking for.
Any monotonic increasing function works. If $f(x)<x$ then $f(f(x))\leq f(x)<x,$ so $f(f(x))\neq x.$ Similarly, $f(x)>x,$ then $f(f(x))\geq f(x)>x,$ so again $f(f(x))\neq x.$ You don't need $f$ to be strictly monotonic.
Also, any $f$ such that $f(x)\geq x$ for all $x.$ If $f(x)\neq x,$ then $f(x)>x$ and $f(f(x))\geq f(x)>x.$ This includes functions like $f(x)=x+x^2,$ or more generally $f(x)=x+g(x)^2,$ for any function $g,$ which are not strictly increasing.
Similarly, if $f(x)\leq x$ for all $x,$ then when $f(x)\neq x$ we get $f(x)<x$ and thus $f(f(x))\leq f(x)<x.$ So this includes functions like $f(x)=x-g(x)^2.$
$x+g(x)^2$ and $x-g(x)^2$ allows solutions to $g(x)=0,$ so we can get functions $f$ with arbitrary sets of solutions to $f(x)=0.$ Given any closed $C\subseteq\mathbb R,$ we can find continuous $g$ with $C=\{x\mid g(x)=0\}$ and then $C=\{x\mid f(x)=x\}.$
There are a lot of such functions.
Given a general $f,$ if $h(x)=f(x)-x,$ your condition $f(f(x))=x$ becomes $h(x+h(x))+h(x)=0$ so you want $$h(x+h(x))+h(x)=0\implies h(x)=0.\tag1$$
It is worth considering what $(1)$ means if $f$ is monotonic increasing.
If $h$ is differentiable, monotonicity of $f$ means $h'(x)\neq -2$ for all $x.$ Then $h(x+h(x))=h(x)+h'(c)h(x)$ for some $c$ in $(x,x+h(x)).$ So $0=h(x+h(x))+h(x)=(2+h'(c))h(x).$ But $2+h'(c)\neq 0,$ so this means $h(x)=0.$
So we can apparently use any $h(x)$ differentiable such that for all $x,$ $h'(x)\neq -2.$ So this means and differentiable $f(x)$ such that $f'(x)\neq -1.$
So this includes a lot of functions which decrease "too quickly," like $f(x)=-2x.$
Darboux's Theorem says that any function which is the derivative of another satisfies the intermediate value property, so if $f$ is differentiable and $f'(x)\neq -1$ for all $x,$ then either $f'(x)<-1$ for all $x$ or $f'(x)>-1$ for all $x.$
If course, there are $f$ with some $f'(x)=-1$ which satisfy this condition. For example, when $f(x)=-(x+x^3).$ Then $f'(0)=-1,$ but $f(f(x))=x$ still implies $f(x)=x.$ This is because while $f'(0)=-1,$ there is no $u\neq v$ with $f(u)-f(v)=v-u,$ because the function $f$ crosses the tangent at $x=0.$
Of course, our mean value condition on $u,v$ excluded $f(u)+u=f(v)+v$ when $u\neq v,$ which is stronger than excluding $f(u)=v, f(v)=u.$
For example, $f(x)=x^2-x$ has $f(f(x))-x = x^4-2x^3,$ so the roots of $f(f(x))=x$ are $x=0,2$ but $f(0)=0, f(2)=2.$ So $f$ has your property, but $f(x)+x = f(-x)+(-x)=x^2,$ so $f$ has infinitely many pairs $u\neq v$ with $f(u)+u=f(v)+v$ but no such pair with $f(u)=v$ and $f(v)=u.$