It is the simplest case. If you had not locked it, the door is only held by the latch, the angled piece that slips into the frame on its own when the door closes, and it can usually be opened without damaging anything.
It happens all the time: you go out to hang the washing, onto the terrace or to take the rubbish out, a gust of wind catches it and the door shuts. On the coast, with the draughts you get when the windows are open, it is one of the most common things that happens.
While we are on our way, do not try sliding in cards or old X-ray films: you can scratch the door or damage the latch. Think about whether a relative or a neighbour has a spare key, which would be the quickest option.
It is explained in door slammed shut and in door opening.