The first thing you have to do is get the new/custom ringtone to be recognized by your Mac or PC's iTunes. Normally, all you have to do is double click on an .m4r ringtone file to open it in iTunes and it should be in iTunes as a ringtone, ready for syncing to your iPhone. If that doesn't work, you can right-click (or Control-click on a one-button Mac) on the .m4r file and select "Open with iTunes." You can also drag the ringtone file from your computer's file explorer into the iTunes Library.
To install the ringtone on your iPhone, all you should have to do is sync your iPhone. However, for a variety of reasons, this does not always work. Check out the Troubleshooting section at the end of this article for more on this.