Yes, the projection $p:X\times Y\to X$ is always an open map.
This follows from the following purely algebraic fact:
Theorem
Given two algebras $R,S$ over a field $k$, the projection morphism $Spec(R\otimes_k S)\to Spec(S)$ is open.
Note that there are no finiteness conditions on the algebras.
The proof can be found in De Jong and collaborators' Stacks Project, Lemma 9.38.10.
A more advanced geometric interpretation of this result is that for a scheme $X$ over a field $k$, the structural morphism $X\to Spec(k)$ is universally open.
We need $k$ to be an infinite field. If $k$ is finite, since point sets are closed in the Zariski topology, we could find two proper closed sets (the union of all but one point of $X$) whose union is all of $X$.
Suppose $U\cap V = \emptyset$. Then $X = (U\cap V)^{c} = U^{c} \cup V^{c}$.
Since $U$, $V$ are open, $U^{c} = V(I)$, $V^{c} = V(J)$ for some ideals $I,J$ of $k[x_{1},...,x_{n}]$. We have then that $X = V(I) \cup V(J) = V(IJ)$.
$I,J\neq (0)$ since $V(I),V(J)$ are proper subsets of $X$. So $IJ \neq (0)$ also since $k[x_{1},...,x_{n}]$ is an integral domain.
Thus there exists an $f\in IJ\setminus \{0\}$ such that $f$ vanishes at all points of $X$. Note that $f$ must in fact be nonconstant.
This is now where we use the fact that $k$ is infinite. Since $f$ is nonconstant, there exists an $i\in\{1,...,n\}$ such that $f$ has a nonzero term with a nonzero power of $x_{i}$ in it. Suppose for convenience of notation that $i=1$. We can then write $f = g_{m}(x_{2},...,x_{n})x_{1}^{m}+ ...+ g_{0}(x_{2},...,x_{n})$ for some $g_{0},...,g_{m}\in k[x_{2},...,x_{n}]$, $g_{m}\neq 0$, and $m>0$. So there is a $(a_{2},...,a_{n})\in k^{n-1}$ with $g_{m}(a_{2},...,a_{n})\neq 0$.
Then $f(x_{1},a_{2},...,a_{n})\in k[x_{1}]$ is nonzero, so can only have finitely many roots. This is a contradiction since $k$ is infinite, and $f$ must vanish at all points of $X=k^{n}$.
Best Answer
If $U \subseteq \mathbf{A}^{n}$ is nonempty and open, then $\text{dim }U=\text{dim }\overline{U}=\text{dim }\mathbf{A}^{n}=n$.
Now if $U \subseteq Z(f)$, then $\text{dim }U \leq \text{dim }Z(f) = n-1$, which is impossible.
Here are the relevant facts used from Ch. 1, Sec. 1 in Hartshorne (valid over any algebraically closed field):
$\bullet$ The dimension of a quasi-affine variety is the same as its closure (Proposition 1.10)
$\bullet$ $\mathbf{A}^{n}$ is irreducible (its ideal is prime: $I(\mathbf{A^{n}})=0$), and a nonempty open subset of an irreducible space is dense (Exercise 1.6)
$\bullet$ The dimension of $\mathbf{A}^{n}$ is $n$ (Proposition 1.9)
$\bullet$ If $Y \subseteq X$ are topological spaces, then $\text{dim }Y \leq \text{dim }X$ (Exercise 1.10a)
$\bullet$ $Z(f)$ has dimension $n-1$ (Proposition 1.13)