If a publisher likes your book and wants to offer you a deal/contract, do you have to travel to them? Or do they send you their contract via email and you have to print it out and sign it and send it back? Or is E-signature involved?
No, you don't have to travel to them. It could be e-sig, print & scan, or mail. More likely one of the first two options.
You either have to travel to them by boat or write them a letter in cursive bearing the king's seal and send it by carrier pigeon. It should explain why you are too ill to brave a trip across the treacherous seas and offer your deepest apologies. They will understand and then pretend you were there and sign the contract for you. It is normal for it to take a few months to hear back if you opt for this second method.
The postal system, or scanned copies is what most publishers that I've come across/worked with utilize for contracts.
I have published several authors in various parts of the world. I like to have a signature, but it can all be done digitally....No need to travel.