Assuming that $X$, $Y$ and $Z$ have $\{0, 1\}$ as their support (you can extend to a more general case reasonably easily):
$\begin{eqnarray}P(Z = 0) & = & P(X = 0, Y = 1) + P(X = 1, Y = 0) \\
& = & P(X = 0)P(Y = 1) + P(X = 1)P(Y = 0) \\
& = & 2 \times P(X = 0)\left(1 - P(X = 0)\right) \\
& = & 2p_0(1-p_0)\end{eqnarray}$
Where $p_0 = P(X = 0) = P(Y = 0) = 1 - P(X = 1) = 1 - P(Y = 1)$, since they are iid.
$\begin{eqnarray}P(Z = 0 | X = 0) & = & P(Z = 0 | X = 0, Y = 0)P(Y = 0) + P(Z = 0 | X = 0, Y = 1)P(Y = 1) \\
& = & 0 \times P(Y = 0) + 1 \times P(Y = 1) \\
& = & P(Y = 1) \\
& = & P(X = 1) \\
& = & 1 - P(X = 0) \\
& = & 1 - p_0 \end{eqnarray}$
So the two are only equal if $2p_0(1 - p_0) = 1 - p_0$, which happens if $p_0 = \frac{1}{2}$ or $p_0 = 1$. In the latter case, $Z$ is always 0, so it is independent of $X$ and $Y$. In the former (which you've now edited to say is the case in question), you flip two coins. Then, if the second coin is tails, you turn the first coin over. Finally, you record the side the first coin is on. It doesn't matter which side the first coin initially lands on, it has an equal chance of being flipped over or not, so the final result is independent of the first coin's initial flip.