Start Garage Band on your Mac
Delete any tracks showing in Garage Band
Drag the track that you want to base your ringtone on from your iTunes library to Garage Band
If the yellow cycle bar isn't showing above the track, click on the cycle button (to the right of fast forward).
Drag the ends of the cycle bar until it matches the part of the track you want to use (maximum 40 seconds).
From the Garage Band menu select Send Ringtone to iTunes
The ringtone is created in the Ringtones section of the iTunes Library and is ready for synchronisation
With your iPhone attached, in iTunes select your iPhone in the lefthand sidebar and then in the main panel select the Ringtones tab and make sure that "Sync ringtones" is ticked
Sync your iPhone in the normal way