Place an audio file that your phone understands somewhere on the phone's file system. Common examples would be mp3 or wav. I usually make this transfer over USB, but there are a few ways depending on your phone. Then, on Android, locate your ringtone settings; on Graphene this is under "Settings" then "Sound & Vibration" and I think it's the same on stock Androids. Once in the ringtone settings, scroll to the bottom of the menu and tap "add ringtone." Find where you saved your audio file and add it, then select it from the ringtone menu. This should now be your custom ringtone. You can make similar changes for other kinds of notification sounds as well.
All of the above is for Androids. Probably the process is similar on an iPhone, but I haven't touched one in ages so I couldn't say for sure.