I know that for $p(X) \in \mathbb{R} [X]$, $a$ is a zero of $p(X) \iff (X-a)|p(X)$. But what would the statement be for $p(X) \in \mathbb{R}[X,Y]$?
This question comes from an example in my textbook:
Let $I=(X+Y,X^2+1)\subset \mathbb{R}[X,Y]$. Consider the homomorphism $\phi: \mathbb{R}[X,Y] \to \mathbb{C}$ defined by $\phi: p(X,Y) \mapsto p(i,-i)$. We claim that $\ker(\phi)=(X+Y,X^2+1).$ Let $p(X) \in \ker(\phi)$. Then $p(i,-i)=0$. This implies that the polynomial $p(X,-X)$ evaluated at $X=i$ is zero and so $p(X,-X)$ is divisible by $X^2+1$. Furthermore, $p(X,Y)-p(X,-X)$ is divisible by $Y-(-X)=Y+X \in \mathbb{R}[X,Y]$
The part in bold is what is confusing to me.
For the first part, of course $p(X,-X)$ is a polynomial in $\mathbb{R}[X]$ and we know that if $z$ is a complex root, then so is the conjugate $\overline{z}$. So $(X-i)$ and $(X+i)$ both divide $p(X,-X)$ and thus so does $(X-i)(X+i)=X^2+1$.
For the second part, think of $p(X,Y)-p(X,-X)$ as a polynomial in $Y$ with coefficients in $\mathbb{R}[X]$. The important thing is that your first paragraph is still true if $\mathbb{R}$ replaced by $\mathbb{R}[X]$ (or indeed any commutative ring with $1$). So since $-X$ is trivially a root of $p(X,Y)-p(X,-X)$, we must have that $Y-(-X)=Y+X$ divides it.