All of the above mentioned methods will work, some easier than others, depending on the dog. I like mixing the medicine in with soft food or a small meatball ; but sometimes, if it is a small dog that chews everything and doesn't just gulp food down, they still do not get the medicine .
Another way that has worked for me is to dissolve the medicine when it is in pill form, and then mix it with a little milk or broth, and then put it in an eye dropper. It is much easier to use the eye dropper to squirt liquid down a dog's throat than it is to stick you finger in their mouth and push down a pill, while trying not to get bit by the frantic dog.
When I had puppies, they had to be wormed every few weeks, and the eye dropper method was the very simplest way to do it.
If the medicine is mixed with milk, or something that tastes good to them, then they will not fuss about swallowing it . This is really similar to @corzhens method, except I used an eye dropper instead of a spoon.