Use one of the many commercial sprays and baits to kill ants. Follow the directions on the package.
Use non-toxic substances such as borax powder, liquid soap and vinegar. Borax will kill them if they ingest it, and if they carry it back to the nest and share, it may kill some there. Spraying ant trails with liquid soap and vinegar seems to disrupt the chemical path they leave for other ants to follow, but it will not affect the source of the problem -- the colony.
Sprinkle black pepper, cinnamon, mint, chili powder, bay leaves, peppermint oil or other spices on your counters and around the house. This may repel foraging ants temporarily, but the colony will not be affected and the ants will find a new route to the food.
Kill the hill. To get rid of ants permanently, find the nest, sometimes called an ant hill. The goal is regicide – killing the queen ant -- and there may be more than one to a colony. Pouring boiling water on an ant hill may kill many of the ants, but if it doesn’t kill the queen, the colony will replace the lost members and return to your house or garden or pasture at full strength