If you collect and use old film cameras, one day it’s going to happen: film will tear during winding or rewinding, or a wind lever will become hopelessly stuck. Your film will be trapped inside the camera. If you open the camera, some of the film will be ruined.
Such are the vagaries of old cameras. It happens to me from time to time, including recently. After shooting the last frame on a roll of expired Tri-X in my Yashica-12, the winder got stuck before the last of the film wound onto the takeup spool. Another time, while rewinding a roll of Kentmere 100 in my Zeiss Ikon Contessa LK, the film tore. Some of the film was on the takeup spool and the rest was inside the 35mm film cartridge.
Times like these call for a dark bag, also known as a changing bag. This bag is black and double lined so no light can get in.
You unzip it to reveal the inner bag, and then you unzip that. Then put the whole camera in the bag and zip both zippers. Then stick your arms through the armholes. Feel around for the camera until you’ve grasped it. Then you can open the camera and, entirely by feel, extract the film.
If the film tore, you’ll want to put some sort of light-tight can or box in there to spool the film into. For 35mm, some brands come in a black plastic can — save a couple of them, as they’re perfect for this. Label the can “Loose Film, Open in Darkness” and send it off to your lab. They should be able to handle that without much trouble.
Otherwise, you should be able to hand-roll 120 film onto the takeup spool, or (tediously) turn the spindle on 35mm film to draw the film back into the cartridge.