How is the sultan of Oman selected?

The Sultan is hereditary