Bribery!
We bribed our toddler (just turned 3) with television, which he's normally not allowed to have. He also had conjunctivitis at the time, so he wasn't allowed to play with other children for fear of spreading the infection. So he had to stay home for at least three days with no other contact.
Every time he wanted to watch an episode of his favorite show (Curious George), he had to use the potty. Did it violate the recommendations of every pediatrician regarding television? Absolutely. But it worked; he now runs to the bathroom every time he needs to go (with some minor relapses when his sister was born). As a commercial plug, Netflix is great for this kind of thing; there are 70+ episodes of the show there, no commercials (beyond the show itself, of course), and no fumbling with a DVD that can get scratched by said three year old.
We tried potty training earlier, but he just wasn't ready yet. Some kids potty train earlier than others; friends of ours claim to have potty trained their daughter by 1.5 years of age, mainly by letting her run around without a diaper and saying that pooping/peeing on the carpet was bad, and that she needed to use the toilet. That approach, for us, just ended up with a lot of soiled floors.
My parents claim that I was potty trained at 2, mainly by making diapers extremely uncomfortable as soon as they got wet. According to them, diapers were just painful, especially if I'd had orange juice to drink, and so I wanted to be out of them as soon as possible. Today's diapers, by contrast, are so absorbent that there's a lot less discomfort. Cloth diapers might accomplish the same level of irritation, but we never used them, so I don't know.
(Yes, I've admitted to bribing my son, letting him watch hours of TV, and never using cloth diapers. I don't think I'm winning any parenting awards here.)