Consider $X\times X$ where the topology is the standard product topology. Let $U, V\subset X$ open in $X$. Then, $U\times V$ is open in $X\times X$, by definition.
Now, let $U, V$ closed in $X$. Then, $X\backslash U, X\backslash V$ open in $X$. Thus,
$X\backslash U\times X\backslash V$ open in $X\times X$. But
$X\backslash U\times X\backslash V = (X\times X)\backslash U\times V$ I think, or rather, I hope, but it makes intuitive sense.
Thus, $U\times V$ closed in $X\times X$.
But, what if $U$ is open and $V$ is closed? Is $U\times V$ open, closed, both, or neither?
$(X \times X)\setminus (U \times V) = ((X\setminus U) \times X) \cup (X \times (X\setminus V)$ ( if $(x,y)$ is not in $U \times V$ then either $x \notin U$ or $y \notin V$, and conversely).
Projections are open maps so if $C \times D$ is open we know both $C$ and $D$ are open in their factor space. This should be enough the settle that question.