This works with my cat - she's very tame tho'...
Sit cat in your lap, cup the back of cat's head with one hand, poke your finger in the tip of cat's mouth so he/she opens mouth, use the thumb from your hand cupping the cat's head and press it gently into the side of the cat's mouth, at the back near the joint(don't need to poke it in too far, this is just to hold the mouth open), drop in pill, hold mouth shut until the swallow, pet cat profusely.
Don't know if it'd work with other cats or not, I just have experience with mine...very tolerant. When I first got her from the pound, she had ear mites, worms, some sort of cat cold, and had a nasty drip from one eye. First trip to the Vet netted her a thermometer in the pooper, light shined in her eyes, gel toejam slimed onto her eyes, two pills, and ear mite stuff squirted into her ears. At the very end she let out a little whimper of a growl. At that point, any reservations I had about getting an animal from the pound subsided!
SOB