Is every projection continuous?
Solution 1:
The continuity of $f$ strongly relies (of course) on the topology $X^{2}$ is provided with. If $X^{2}$ has the product topology, then the projections onto the factors are clearly continuous (if you like, this is just by definition of product topology, see here).
Solution 2:
If $\{X_\omega\}_{\omega \in \Omega}$ is a family of topological spaces, it is standard practice to turn the corresponding Cartesian product $\prod_{\omega \in \Omega}X_\omega$ into a topological space as well by equipping it with the so-called "product topology."
Now, the important thing to realize is that this product topology is expressly defined so as to make all the projections $\pi_\alpha:\left( \prod_{\omega \in \Omega}X_\omega \right) \rightarrow X_\alpha$ continuous.1
Therefore, absent any specific information to the contrary, I'd say that the answer to your question is yes.
(But, as already mentioned, the question of continuity does depend critically on the topologies chosen—after all, it is the topologies of the domain and codomain that define which functions are continuous. This means that, if, contrary to standard practice, the topology assigned to your $X^2$ is not the standard product topology described above, then all bets are off.)
1And in fact, this product topology is defined to be the smallest (aka weakest) topology with this property. More specifically, the product topology is defined as the topology on $\prod_{\omega \in \Omega}X_\omega$ that is generated by the subbase
$$\bigcup_{\omega \in \Omega}\{\pi_\omega^{-1}(U):U\text{ is open in } X_\omega\}$$
This means that the product topology is the smallest topology on the product space that contains all the inverse images of open sets with respect to some projection $\pi_\omega$. Therefore, in this topology, the projections $\pi_\omega$ are rendered continuous by construction.