My son was 5 when I taught him how to swallow pills. What I did was gather up things like sprinkles, rice, lentils (both dried), and other food items that are tiny but varying sizes. Then I explained to my son that we are playing a game to see what food we can swallow with water without biting into it. And then I showed him how to do it by taking the very smallest food item - a sprinkle - putting it on my tongue, taking a huge sip of water, opening my mouth and sticking out my tongue to show him that it had disappeared. Then it was his turn. We went back and forth with this for quite a while until I felt comfortable that he got the concept. And then for the next couple of weeks, whenever he had to take his pill, I would have him swallow sprinkles just as a sort of warm up.
The last time I was at the pharmacist, I noticed a spray that you can spray on your tongue that helps slide down a whole lot easier. Since my son has to take a gel cap right now that doesn't feel all that great when its on his tongue, I purchased the bubblegum flavored spray and it has made the whole process a lot easier.