I have been trying to solve this exercise given by my prof. The hint is to show that every $2$-form $w$ on $S^2 \times S^4$ is s.t. $w \wedge w = 0$, while this is not true in case of $\mathbb{P}_{\mathbb{C}}^3$.
The first part can be done using Künneth formula and noticing that a basis for $H^2_{DR}(S^2\times S^4)$ is $ \{ [ \pi_1^* w ] \}$, where $\pi_1$ is the projection $S^2\times S^4 \to S^2$ and $w$ is a generator for $H^2_{DR}(S^2)$, and that $w\wedge w \in \Omega^4(S^2) = \{0\}$.
How can I show the second part?
I may find a basis for $H^2_{DR}(\mathbb{P}_\mathbb{C}^3)$ by, for example, considering a $4$-dimensional submanifold and taking its Poincaré dual (assuming it is not null), but I'm a bit stuck. Any help is highly appreciated
Cargo's answer doesn't seem to give any geometric intuition for the statements he/she claims; let me try and remedy that.
Let's just talk about $\mathbb{CP}^n$. There are ways of calculating $H^{\bullet}(\mathbb{CP}^n;\mathbb{Z}) = \mathbb{Z}[x]/x^{n+1}$, where $x$ has degree 2 (cellular homology + universal coefficients gives you the module structure; using the inclusion into $\mathbb{CP}^{\infty} = K(\mathbb{Z},2)$ is probably the slickest, though). You're on the right track in thinking about producing $x$ as the Poincaré dual of some codimension-2 (i.e., dimension $2n-2$) submanifold.
Remember that $\mathbb{CP}^n = (\mathbb{C}^{n+1}-\mathbf{0})/\mathbb{C}^{\times}$. In homogeneous coordinates, $$\mathbb{CP}^n = \{(x_1, x_2, \cdots, x_{n+1}) \neq (0,\cdots,0)\}/(x_1, \cdots, x_{n+1}) \sim (\lambda x_1, \cdots, \lambda x_{n+1}).$$
Let's think about the hyperplane $H_1 = \{x_1 = 0\} \subset \mathbb{C}^{n+1}-\mathbf{0}$, which is obviously taken to itself by the $\mathbb{C}^{\times}$-action. Hence the Poincaré dual of $H_1/\mathbb{C}^{\times}$ is some class in $H^2(\mathbb{CP}^n;\mathbb{Z})$. Similarly, the Poincare duals of $H_2/\mathbb{C}^{\times}, \cdots, H_{n+1}/\mathbb{C}^{\times}$ are all classes in $H^2(\mathbb{CP}^n; \mathbb{Z})$.
Now we know that cup product under Poincare duality corresponds to intersection, so we have (note the indices!) $$PD(H_1/\mathbb{C}^{\times}) \cup \cdots \cup PD(H_n/\mathbb{C}^{\times}) = PD\left(H_1/\mathbb{C}^{\times} \cap \cdots \cap H_n/\mathbb{C}^{\times}\right) = PD((H_1 \cap \cdots \cap H_n)/\mathbb{C}^{\times}) = PD(\{x_1 = \cdots = x_n = 0\}/\mathbb{C}^{\times}).$$
But if $x_1 = \cdots = x_n = 0$, then $x_{n+1}$ must be nonzero, and after modding out by the $\mathbb{C}^{\times}$-action we are left with just a point - which is Poincare dual to the fundamental class of $\mathbb{CP}^n$! Hence up to sign, $$PD(\{x_1 = \cdots = x_n = 0\}/\mathbb{C}^{\times}) = PD(\mathrm{pt}) = \left[\mathbb{CP}^n\right] = 1 \in H^{2n}(\mathbb{CP}^n;\mathbb{Z}) \cong \mathbb{Z}.$$
This means that all of the classes $PD(H_i/\mathbb{C}^{\times})$ must be equal to $\pm1 \in H^2(\mathbb{CP}^n;\mathbb{Z}) \cong \mathbb{Z}$, and all their products are nonzero (since the product of any $n$ of them is nonzero). But then we have $$PD(H_1/\mathbb{C}^{\times})^2 = \pm PD(H_1/\mathbb{C}^{\times}) \cup PD(H_2/\mathbb{C}^{\times}) = \pm1 \in H^4(\mathbb{CP}^n;\mathbb{Z}) \neq 0.$$ Now using the de Rham isomorphism gives that this is nonzero in $H^2_{dR}(\mathbb{CP}^n;\mathbb{R})$, as desired.
The submanifolds $H_i/\mathbb{C}^{\times}$ that we've constructed are called hyperplane sections of $\mathbb{CP}^n$ and are one of the most important features of projective geometry. With a little more work you can show that they're all equal on the nose, not just up to sign, but we don't need that here (and I don't really remember how the details of that argument go).