If the base has just one syllable and that syllable contains just one vowel followed by a single consonant, you double that consonant before adding the "ed" ending:
I beg - I begged
I clap - I clapped
Note that "x" is not really a single consonant; it is a double consonant: k+s. That means you do not write a double x before the "ed" ending:
I fix - I fixed
I box - I boxed
If the verb base has more than one syllable, you apply this rule about doubling the single final consonant only if the final syllable is stressed:
I admit - I admitted
I refer - I referred
There are, however, a few words that double the final consonant even though they are not stressed on the final syllable:
I kidnap - I kidnapped
I worship - I worshipped (although you will also see this spelling: worshiped)
In British English, you double a final l regardless of whether the final syllable is stressed or not:
I travel - I travelled
(American English: I traveled)
I equal - I equalled
(American English: I equaled)
When a verb ends in "w" following a vowel, the "w" is treated as a vowel rather than as a consonant, so you do not double it. Instead, just add the "ed" ending:
I bow - I bowed
I claw - I clawed
If the verb stem ends in the letter "c" (which is very rare!), you write "ck" (not "cc") before the "ed" ending:
I panic - I panicked
I mimic - I mimicked
Why are these spelling rules important? One important reason is that they help you to recognize different verbs in the past tense. These are especially tricky because the spellchecker cannot help you with these words! You have to know the difference when you spell them:
I hop - I hopped
I hope - I hoped
I star - I starred
I stare - I stared
I rob - I robbed
I robe - I robed
By following the rules for doubling the consonants, you can make sure your readers recognize the word you are using and understand your meaning. Variations on these same rules apply when adding other verbal suffixes such as -ing and also the various suffixes used to create noun forms. Here are some examples:
run - running
clap - clapping
begin - beginning
Someone who robs is a robber.
Someone who makes pots is a potter.
Someone who makes plans is a planner.
Proverb: A running horse has no need of spurs.
(Details at the Proverb Lab.)