Garlic pills will cause you to put out a scent of garlic which will indeed help to repel mosquitoes.
Mosquitoes hate the smell of garlic and will usually stay away from you.
You can also eat garlic to keep mosquitoes away from you or wear some garlic around your neck to keep the mosquitoes away.