[This is a fast-access FAQ excerpt.]
The general rule is that when one of the suffixes "-ed", "-ing",
"-er", and "-est" is applied to a word ending in one consonant
preceded by exactly one vowel, the consonant is doubled if and only
if the word's final syllable is stressed: "omitted" but "edited";
"preferred" but "offered". Americans obey the stress rule when the
final consonant is "l": "repelled" but "traveled". Britons double
"l" regardless of stress: "repelled", "travelled". Detailed
discussion of doubling can be found in MEU under "-B-, -BB-",
"-C-, -CK-", "-D-, -DD-", etc.