In very simple terms an electromagnetic lock would commonly be a "maglock". An armature with metal plate that becomes magnetised when power is applied. Attach this to a solid piece of wall and screw a metal plate to the door and hey presto the door is held closed until such time the power is removed from the armature.
No moving parts therefore could last forever.
This is the basic "failsafe" method for releasing doors when power fails. Although there are certain instances where you may wish to battery back the system to keep the doors locked in certain secure installations etc.
An electromechanical lock would generally have a moving mechanism, eg. there would be a draw bolt that physically moves in order to secure the door. Or more commonly if you imagine a yale lock, the keep located in the door frame would have a hinged strike plate that is fixed in position under normal conditions (power applied) but would become free when power is removed, allowing the latch bolt to move the strike plate and push passed it without the bolt physically being drawn back by hand. ie turning a handle.
This is also failsafe and can be installed the other way round.
There can be issues with both methods, commonly residual magnetism in the maglock not releasing the plate, hence double pole isolation of the power directly to the magnetic, and mechanical failure of the second type or poor fitting that would mean the door couldn't be opened in an emergency.