Solution by OronSH.
Let P(x,y) denote the assertion
f(xf(x)+xy)=f(x2)+f(x)f(y).
The functions f≡0 and f(x)=x both work.
Suppose first that f(a)=0 for some a=0. Then P(a,y) gives
f(ay)=f(a2)
for all real y. Since a=0, this makes f constant; checking constant solutions gives only f≡0.
Now assume 0 has the unique preimage 0. Put y=x−f(x) in the original equation. Then
f(x2)=f(x2)+f(x)f(x−f(x)),
so
f(x)f(x−f(x))=0.
If f(x)=0, then x=0. Otherwise, f(x−f(x))=0, so x−f(x)=0. Hence every x satisfies f(x)=x, and the nonzero solution is f(x)=x.
Together with the constant case, the solutions are
f(x)≡0orf(x)=x.