Find all solutions to $f\left(x^2+xf(y)\right)=xf(x+y)$

The function defined by $f(x) = 0$ for all $x \in \mathbb{R}$ is a solution to the functional equation.

Suppose that $f$ is some other solution. Then there is a real number $c$ such that $f(c) \neq 0$.

For any $r \in \mathbb{R}$, let $x = \frac{r}{f(c)}$, and let $y = c - x$. The functional equation then gives us that $$ f \left( x^2 + xf(y) \right) = xf(x + y) = xf(c) = \frac{r}{f(c)} \cdot f(c) = r $$ showing that $r \in f(\mathbb{R})$. i.e. The function is surjective.

As you noted, we have that $f(0) = 0$, which follows by taking $x = y = 0$ in the functional equation.

Now let $x = -f(y)$ in the functional equation. We obtain that $$ 0 = f(0) = f \left( f(y)^2 - f(y) f(y) \right) = -f(y) f(y - f(y)) $$ for all $y \in \mathbb{R}$.

Then for any $y \in \mathbb{R}$, we have that if $f(y) = 0$, then $f(y - f(y)) = f(y) = 0$, and if $f(y) \neq 0$, then $-f(y) f(y - f(y)) = 0$ implies that $f(y - f(y)) = 0$. We thus have that $$ f(y - f(y)) = 0 $$ for all $y \in \mathbb{R}$.

Also as noted by you, we have that $f(x^2) = xf(x)$ by taking $y = 0$ in the functional equation.

Now for any real number $x$, we showed earlier that there is some $y \in \mathbb{R}$ such that $f(y) = x$.

We then have that $$ xf(x) = f(y) f(f(y)) = f(f(y)^2) = f \left( f(y)^2 + f(y) f \left( y - f(y) \right) \right) $$ using the fact that $f(y - f(y)) = 0$. The functional equation then gives us that $$ xf(x) = f(y) f \left( f(y) + y - f(y) \right) = f(y) f(y) = x^2 $$ holds for all $x \in \mathbb{R}$. For $x = 0$, we already have that $f(x) = 0 = x$. If $x \neq 0$, then we can divide the previous relation by $x$ to find again that $f(x) = x$. We thus conclude that $f(x) = x$ for all $x \in \mathbb{R}$.