Mix it in with their wet food
This method works great for most cats and dogs and it is by far the easiest option. Hide the pill in a chunk of meat and mix it in the gravy; your pet will be none the wiser. Just make sure to check with your vet to find out if the pill can be crushed or taken with food.
Cover it in smelly food
Hiding it in smelly food is the best way to mask the pill's smell. Some good options include vegemite, liver patè, Kong paste or anything stinky. Make sure to coat the pill just thick enough to disguise it.
The treat game
Option one: All you have to do is grab three or four treats and the pill or chew. Toss each of the treats to your dog and then finally give them the pill.
Option two: If you have another dog, feed him several treats, but don't allow the dog who needs a pill to have any. When you are done, feed your pet the pill and they will take it willingly, thinking it's a treat.
It can go either way, but this is worth a try. Take a few minute to tell your dog they cannot have the pill and they might just down it without any fuss. There is no way they will let you have it if they can have it instead.
If all the above options don't work, try a pet piller. A syringe type device which helps give you more control when administering tablets and capsules. As most of the above options won't work for cats this is a great option.