Cohomology is a stronger invariant than homology because it can be equipped with a ring structure. To be precise, if one starts with the singular cohomology groups $H^\bullet(-; R)$ with coefficients in a ring $R$, then there is a map $$H^n(X; R) \times H^m(X; R) \stackrel{\smile}{\to} H^{m+n}(X; R)$$ which is graded commutative - that is, $\alpha \smile \beta = (-1)^{mn} \beta \smile \alpha$ where $\alpha \in H^n(X; R)$ and $\beta \in H^m(X; R)$. This makes $\bigoplus_i H^i(X; R)$ into a graded commutative ring, which we denote as $H^*(X; R)$, known as the graded cohomology ring of $X$ with coefficients in $R$.
Now, the cup product map above can be defined in several ways.
One standard way to define it is as $$H^n(X; R) \times H^m(X; R) \to H^{n+m}(X \times X; R) \to H^{n+m}(X; R)$$ where the first map in the composition is induced from the Eilenberg-Zilber map $C^n(X) \times C^m(Y; R) \to C^{n+m}(X \times Y; R)$ and the second is induced from the diagonal inclusion $\Delta : X \hookrightarrow X \times X$.
Originally, Poincaré defined this for smooth manifolds using transversality. That is, if $M$ is a smooth $n$-manifold, $N, L$ are submanifolds of $M$ of codimension $k$ and $l$ respectively, then $[N], [L]$ represent homology classes in $H_{n-k}(M; \Bbb R)$ and $H_{n-l}(M; \Bbb R)$ respectively. Assume further than $N$ and $L$ are transverse. Under the Poincaré duality, $[N]$ corresponds to $[N]^*$ in $H^k( M; \Bbb R)$ and $[L]$ corresponds to $[L]^*$ in $H^l(M; \Bbb R)$. Poincaré then defined cup product of these two classes as $[N]^* \smile [L]^* := [N \pitchfork L]^*$, the dual of the class represented by $N \pitchfork L$.$(\star)$
However, there is a much easier definition one can see in standard algebraic topology books (e.g., Hatcher) which goes as follows. Take a $k$-cochain $\psi$ in $C^k(X; R)$, an $l$-cochain $\varphi$ in $C^l(X; R)$, and then define the $k+l$-cochain $\psi \smile \varphi$ by $$(\psi \smile \varphi)(\sigma) := \psi(\sigma|_{[v_0, \cdots, v_k]}) \varphi(\sigma|_{[v_k, \cdots, v_{k+l}]})$$ where $\sigma : \Delta^{k+l} \to X$ is a $(k+l)$-singular simplex. One can easily see that this cochain-level map $C^k(X; R) \times C^l(X; R) \to C^{k+l}(X; R)$ descends to homology. This is precisely the cup product.
All the definitions above are equivalent. The first definition was discovered by Eilenberg & Zilberg in this paper, the second by Poincaré in Analysis Situs. But who discovered the third?
Remark$(\star)$: It is not true however that every sinuglar cycle of a smooth manifold can be represented by a submanifold, see Thom's paper. Although, this is a high dimensional phenomenon and the first counterexample appears at dimension $7$.