A magnetic lock is one that uses a magnet to move or hold the latch. It is very common on internal doors: the latch stays inside the case and only comes out when it passes the magnet in the strike plate, so the door closes quietly and there is no protruding part to rub or catch on clothing.
The name is also used for the electromagnets that hold the doors of blocks of flats and offices shut while they have power. Those are part of access control, which we do not work with.
On internal doors, if the door stops staying shut, it is almost always because the strike plate is no longer in line with the latch: the door has dropped or the frame has moved. It is put right by adjusting, without changing the lock. More under lock installation.