Hexagonal manganites with coexisting antiferromagnetism and ferroelectricity have driven numerous research activities uncovering their potential in novel electronic devices. An antiferromagnetic order lowers the translational symmetry of the lattice; the structure of domain walls spatially separating distinctly ordered antiferromagnetic and structural states is quite rich and needs to be understood fundamentally. Here, we construct a model Hamiltonian to capture the low energy physics of coupled spins and phonons in hexagonal multiferroic ${\mathrm{YMnO}}_{3}$ derived from first-principles density functional theory and determine its temperature dependent behavior using Monte Carlo simulations. We demonstrate a weakly first order or close to being second order N\'eel transition accompanied by a $giant$ magnetoelastic effect observed experimentally in ${\mathrm{YMnO}}_{3}$ and show how it originates from the coupling between the in-plane ordering of spins with symmetry of ${\mathrm{\ensuremath{\Gamma}}}_{3}$ irreducible representation and collective atomic displacements with symmetry of ${\mathrm{\ensuremath{\Gamma}}}_{1}$ irreducible representation. We reveal the intriguing magnetic structure with the symmetry of ${\mathrm{\ensuremath{\Gamma}}}_{1}$ irreducible representation at the ${180}^{\ensuremath{\circ}}$ antiferromagnetic domain wall and predict a linear magnetoelectric coupling which can be confirmed using the piezoresponse force microscopy. Finally, we show that a stable magnetic vortex forms along a line of intersection of six ${60}^{\ensuremath{\circ}}$ antiferromagnetic domain walls, with energy comparable to that of dislocations in metals.