The most common way to control ants in your home is to find the nest and treat it and the area on the outside of your house with non-repellent insecticide. There are, however, specific strategies that go more in depth, depending on whether the ants live outside your house and come in or build a nest on the inside of your house.
If ants live outside your house and are coming inside, another way of controlling them is caulking any cracks or crevices to prevent them from coming inside. Another tip is to clean the areas where they are seen with detergent. This eliminates the pheromone trail the ants follow to get inside your house, at which point you can apply a residual pesticide.
For ants that actually form a colony inside your home, the first thing you should do is try and locate the nest. This may force some people to drill tiny holes in their walls until the nest is located. Once the nest is found, you can apply pesticide dust to kill the colony. You can also consider using a non-repellent insecticide on the nest to ensure it's eliminated entirely.
Ant baits are another way to eliminate a colony living inside your house. All you have to do is place the baits near any visible ant trails. The baits should consist of both a sweet-based bait and a protein-grease based bait. Just make sure not to apply residual repellent insecticide near the baits.