What is the treatment for my child's earache?

That Depends... Depends on what's causing it. Ear aches can come from teething, middle ear infection, tooth grinding, swimmer's ear, foreign bodies (never underestimate the curiosity of children in placing things in their ears--or the ears of others!), and a host of other causes. A proper diagnosis is the first step toward effective treatment.
Home care & doc care. At home, until you can see doc to have them find out the cause, you can give Acetaminophen or ibuprofen. Also, you can use heat (carefully) to help more quickly. A heating pad on a low setting or warm water bottle or compress help, but also, you can use a hair dryer on a low setting from a distance (so you don't risk burning them) to blow warm air in. It often calms the ear pain within minutes.