When you add a suffixes and the second syllable of the new word is stressed, then you need to double the 'r'. For example, adding the suffix -ed to the word 'prefer': prefer + -ed → preferred ...