How do you repair a grounded aircraft at a remote location?
If you can, you'll fly in maintance yourself to get it fixed, perhaps by chartering a cargo plane on the way. If you can land the aircraft, you can probably get any spare part in through the same runway, with varying degrees of difficulty.

If it's bad, Boeing has an Aircraft On Ground team who should be able to fix pretty serious damage. Often, it may just be patched up until it's good enough to fly to get it to a place with better facilities.