your locking mechanism has broken and needs to be replaced (or part of it) however there are many different types and you will need the right one as your door frame will be routed out to fit your specific lock. de-glaze your door first of glass and or panel and try and jiggle your door out but probably will not work. next step is to try and remove the door from its hinges but there are two types (butt hinges, thin and flag hinges, flag shaped). hopefully yours are butt hinges as these have a pin that runs through the hinge that can be knocked through ,however these pins are thinner in the middle and are secured in place by means of a grub screw which you can not get at as the door is shut but sometimes these have not been tightened. i will get back to this.
flag hinges are different, they sit on a spindle which is attached to the frame and the door can only be lifted off when the door is open and there are different types and sizes of flag hinges! these spindles need to be cut (using an angle grinder, the quickest) and the hinges replaced.
getting back to the butt hinge:-
i have just had to remove a door because of the same problem you have but the grub screws had been tightened so brute force was needed. i started with the middle hinge and after a long time managed to get the pin out although this was now scored but i persevered for a reason! the top and bottom pins would not come out. i then cut the top and bottom hinges off with a grinder carefully so as not to cut into the door frame. once this was done the door came out easily. i noted the make of the locking mechanism, removed the handles and key barrel then the lock mech. i found that it was only the central gear box that i needed but i suggest that you replace the whole mech as there are springs and many small parts inside. i ordered 3 new hinges (correct size) and a new gear box (correct backset 35mm) from the internet. i then put the door back onto its central hinge and closed the door. using a sash jammer (lever) that i screwed to the frame i prevented the door from being opened and then re-glazed the door. i then re-visited when new parts arrived.
i only did this because it was for a friend and did not charge. for any one else i would just suggest a new door because of time, cost of new parts and labour charges.
quentin
March 2009