If you do not have iTunes, download it on the official website of Apple and install it on your computer – without it, to upload to iPhone music will be problematic.
After you install iTunes, run the program. In the left menu, select "Music" and drag your music.
Select the desired song and click the right mouse button. In the context menu, select "Information". Go to the Settings tab and check the boxes "Start" and "Stop".
In the "Start" enter the start time of the ringtone and the "Stop" time of the end. Remember that the length of a melody should not exceed 40 seconds.
Click "OK" and then click again on the songs, right click and select "Create AAC version".
Wait a few seconds, until there appears that you created the ringtone with the same name. Drag and drop it to your desktop and change the file extension from m4a to m4r.
Now drag the file to the "Ringtones" menu in iTunes and connect your iPhone to your computer.
Once your iPhone will be determined and added as a new device menu in iTunes, drag your created ringtone from a familiar folder "Ringtones" in the same folder on the iPhone.
iTunes will notify you of synchronization devices, and the ringtone will appear in your iPhone. Open it and select menu "Settings" - "Sounds" - "Ringtone". Find your ringtone and click its check box. Now your tune will be used as a ringtone.