By not swallowing:
The term is a bit of a misnomer, since swallowing is actually the last thing you want to do with a sharp blade, since it involves contraction of numerous muscles; instead, the idea is to completely relax the throat and turn it into one long "living scabbard."
Essentially, sword swallowers have to figure out how to carefully align a sword with their upper esophageal sphincter — a ring of muscle at the top end of the throat– and straighten the pharynx, commonly achieved by hyper-extending the neck by tipping the head waaay back. The practitioner must then move his tongue out of the way and consciously relax his throat as he "swallows" — not an easy thing to do because of our involuntary gag reflex, the body’s defense mechanism against swallowing foreign objects.