In order to set a custom alarm sound on an iPhone, you need to first download the desired sound file to your device, then go to the Clock app, select the Alarm tab, choose the desired alarm, tap on the Sound option, and finally select the downloaded sound file from the list of available options.