hydride ion is a hydrogen atom with an extra electron - hence the lone pair.
All of these particular cases contain a very electronegative element with an active lone pair of electrons - either oxygen or nitrogen.
hydrogen ion from the acid and attaches it to the lone pair on the nitrogen.
lone pair.