Lockjaw is an old name for tetanus. But you might have meant that thing where you try to fit a whole burger in your mouth at once and your jaw locks open? That’s a different thing entirely and easily fixed. Just take the burger out of your mouth, put your fingers in, and press firmly downwards and backwards on the bottom of you jaw. Just be careful that you don’t bite your fingers off when your jaw snaps shut.
Is you mean lockjaw as a symptom of tetanus then you’re in a bit more trouble. Tetanus occurs when deep wounds or cuts become infected with the Clostridium tetani bacterium. The bacterium produces a toxin called tetanospasmin which causes muscle spasms and rigidity (check out some pictures. It looks pretty horrific).
Having a tetanus shot every 5-10 years protects you from this toxin. It takes a while for the toxin to be produced, so having the shot just after a cut or bite should protect you (but it’s better if it’s at least two weeks before).
There are things you can do for a person who is already in the grips of the toxin (drugs, tracheotomy, mechanical ventilation) but it is definitely not nice, so stay up to date on your vaccines.