In Milne's CFT book, I saw that the second group cohomology $H^{2}(G, M)$ corresponds to the set of equivalence classes of extensions $$ 1\to M\to E\xrightarrow{\pi} G\to 1 $$ and the bijection is the following : for any given extension $E$, choose (set-theoretic) section $s:G\to E$ to $\pi:E\to G$. We give $G$-module structure on $M$ as $$ \sigma\cdot m = s(\sigma)ms(\sigma)^{-1} $$ This depends only on $\sigma$ since $M$ is abelian. Define $\varphi:G\times G\to M$ as $$ \varphi(\sigma, \sigma') = s(\sigma)s(\sigma')s(\sigma\sigma')^{-1}. $$ (The element is in $M$ since it is in $\ker(\pi)$.) Then $E\mapsto [\varphi]$ gives the desired bijection.
From this bijection we may inherit group structure of $H^{2}(G, M)$ to the set of the isomorphism classes, but I cannot understand this structure explicitly. The identity should corresponds to the trivial extension $$ 1\to M\to M\times G\to G\to 1, $$ but the group operation is the problem. For given two extensions $$ 1\to M\to E_{1}\to G\to 1 \\ 1\to M\to E_{2}\to G\to 1, $$ how can we 'add' these to extensions? It may not be $E_{1}\times E_{2}$ or $E_{1}\otimes E_{2}$.