In general, should you ever incur a problem with your camera, the first priority is to save the shots. Always carry a change bag with you! First, attempt to rewind the film normally. If this, too, is stuck...then you'll need to crack the back and pull the film (carefully) by hand (this is where the change bag comes in).
Once you get the film rewound back into the can, develop it as usual.
Now that you've saved your images, you can inspect the film for clues:
If you have a long leading strip of burned frames (black, overexposed frames), then you simply used up too much film in getting the wind started. If this is the case, practice getting the wind going using less film, as you're just sacrificing frames here.
If you have a strip of unexposed frames at the other end, then yes, your camera did, in fact, jam up.
If the camera did jam up, look at the edges of the film for damage. If the film jumped the sprocket, attempting to wind it will damage the edges of the film. This is usually incurred at the beginning, not 28 frames in...but still something to look for.
If the film looks good, then the next thing to look at is the camera. If there is a problem with the advance mechanism, it'll likely be jammed even after removing the film. This will take a repair1.
And if, for some reason, things work normally on the next roll...simply chalk it up to a fluke and keep shooting. Should another jam occur, you may need to get the camera checked out1.
1: My local repair shop (Oregon, USA), charges about $200 - $300 for shutter speed setting and CLA. This is a large chunk of the FM2's value and may not be considered "worth it" by some. The FM2 is a workhorse of a camera, and in my opinion, perfectly worthy of repair. After a repair and CLA, it'll likely be good to go for another few decades!