  The large antiferromagnetic exchange coupling in the parent high-$T_{\rm c}$
cuprate superconductors is believed to play a crucial role in pairing the
superconducting carriers. The recent observation of superconductivity in
hole-doped infinite-layer (IL-) NdNiO$_2$ brings to the fore the relevance of
magnetic coupling in high-$T_{\rm c}$ superconductors, particularly because no
magnetic ordering is observed in the undoped IL-NdNiO$_2$ unlike in parent
copper oxides. Here, we investigate the electronic structure and the nature of
magnetic exchange in IL-NdNiO$_2$ using state-of-the-art many-body quantum
chemistry methods. From a systematic comparison of the electronic and magnetic
properties with isostructural cuprate IL-CaCuO$_2$, we find that the on-site
dynamical correlations are significantly stronger in IL-NdNiO$_2$ compared to
the cuprate analog. These dynamical correlations play a critical role in the
magnetic exchange resulting in an unexpectedly large antiferromagnetic nearest
neighbor isotropic $J$ of 77 meV between the Ni$^{1+}$ ions within the
$ab$-plane. While we find many similarities in the electronic structure between
the nickelate and the cuprate, the role of electronic correlations is
profoundly different in the two. We further discuss the implications of our
findings in understanding the origin of superconductivity in nickelates.
