I've come across with examples of decompositions of algebraic sets into irreducible ones, but I'm confused on how they justify the sets are irreducible. They show $V$ is irreducible by showing $K[X,Y,Z]/I(V)$ is an integral domain. So does that show $I(V)$ is prime, hence $V$ irreducible? How do I prove this implication? Also, how to show $V$ is irreducible when it is not prime?
Thanks
First of all, in the link you gave the field is assumed algebraically closed.
Moreover, a variety $V$ is irreducible if and only if $I(V)$ is a prime ideal; see e.g. here (page 3), or here. Or, for an algebraically closed field, $I(V(I))=\sqrt I$. If $I$ is a prime ideal, then $\sqrt I=I$ (hence a prime ideal) and you are done.
In that example $V=V(f_1,f_2)$ with $f_1=y+x^2, f_2=-1+2x+y$. Then the radical of ideal $I=(f_1,f_2)$ equals $(x-1,y+1)$ and this is easily seen a prime ideal.