Insecticide sprays eliminate visible ants which represent about five percent of the entire colony. Insecticide sprays can actually cause colonies to move or split into multiple colonies, thus aggravating the problem. Ant baits, on the other hand, work gradually by allowing ants to return to their colony with the bait. The bait is then passed amongst the nest mates, killing the entire colony.
Ants exhibit different feeding preferences, depending upon the species and the stage of development. The two main categories of baits are sweet baits and protein baits. To maximize effectiveness it is recommended that a combination of these two ant baits be used simultaneously. As with any pesticide, you should always follow the label directions. During application (as well as storage) always place the baits out of the way of pets and children and always follow the label directions.
Granular ant baits for outdoor use are usually available at most hardware stores. They can usually be disbursed around the exterior perimeter of the house. Read the label for the specifics of the application. As with most insecticides, the bait will wash away or break down quickly with moisture and sunlight. Reapply regularly as the label permits.
TERRO is a very common sweet bait which can be used indoors or out. It comes with removable cardboard cut-outs which are attached to the box. You can apply the bait to the cutouts and place it appropriately. This bait is much like sugar water and tends to crystallize over a few days. I would recommend reapplication every 3 to 5 days until the ant problem subsides. Again, follow the label for reapplication rates.
Additionally there are a number of ant bait stations which allow for easy placement indoors and out. These are usually protein baits. Two of the more common brands are Raid and Combat. Again, always follow the label instructions. Replace the bait station when it is depleted or at 3 month intervals.
For indoor placements, remember that ants are usually going for a source of moisture and/or food. In addition to areas of obvious ant activity, kitchens and areas where water pipes and drains are found are usually logical areas for placement of baits.