Yes you apply for the visa beforehand, and it will be issued approx 2 days before you get to Saudi.
All reports are that Saudis were very friendly and welcoming and happy to see tourists.
If you don’t take a ships tour then MSC run a free ( yes free!) shuttle bus to Khobar which is on outskirts of Damman, waterfront shops and restaurants etc