Pills often come in two different forms. The easiest one is often meat flavored and the dog just chews it up. But most pills shouldn't be chewed and you have to find another way to get the dog to take them.
Top tips for medicating dogs when giving pills is to hide them in food. Some accepted foods for this are cheese, bread and meat.
There are also pocket shaped treats
that you can buy to actually hide the pills in. If you are going to medicate a dog this way, you need to ask the veterinarian which types of foods can be used with each medicine since not all human foods are dog friendly.
Personally, my dogs prefer peanut butter, which can be messy but works every time. Some people even put peanut butter on a small piece of bread, wrap the bread around the pill (so that it is covered in peanut butter) and give it to their dog. Typically, I just use creamy peanut butter by itself - I'll put a heaping spoonful on a plate, or sometimes just on the spoon, and then stick the pill inside. The dogs just lap up the peanut butter, pill and all. This has always worked for me.
If this doesn't work for you, and you have a calm dog, you can slide the pill between cheek and gum and slowly push it back behind the teeth. The dogs swallow reflex will usually help get the pill swallowed.
I do not recommend trying to push the pill down the dogs throat if you don't know what you're doing. This can result in you getting bitten and in the dog being not willing to take medicine at all in the future. It can also cause scratches on the dogs throat which could become infected.