While I don't know how Mathematica solves all such cases, it's worth noting that you need to impose some conditions on Cauchy's functional equation $f(x) + f(y) = f(x+y)$ for it to have a unique solution, such as that $f$ is continuous.
Nonetheless, what's probably going on in this case is that Mathematica turned the system into a recurrence, solved that, and then tested to see if that solution also works on negative numbers, rationals and reals.
Let me show you what I mean. Consider the (more complex) functional equation:
$$f(x+y) + f(x-y) = 2\left[ f(x) + f(y) \right]$$
Set $x = y = 0$ to find:
$$2 f(0) = 4 f(x) \Rightarrow f(0) = 0$$
Set $x=n$ and $y=1$ to find:
$$f(n+1) + f(n-1) = 2\left[ f(n) + f(1) \right]$$
$$\Rightarrow f(n+1) = 2f(n) - f(n-1) + 2f(1)$$
Assuming that $f(1)$ is a free constant, what we have now is a linear inhomogeneous recurrence, and there are well-known reasonably mechanical ways to solve these. Once you've found a potential most-general solution for natural numbers, test to see if the solution is still true for negative numbers, rationals, and reals.
In the cause of the Cauchy functional equation, set $x = y = 0$ to find:
$$2f(0) = f(0) \Rightarrow f(0) = 0$$
and set $x=n$ and $y=1$ to find:
$$f(n + 1) = f(n) + f(1)$$
I'll leave the rest as an exercise.