Ants are a social insect that lives in colonies. Treatment plans should include killing the entire colony. Just spraying an ant with a typical ant spray, particularly a repellent spray will only kill a few at best and scatter the colony.
Ants may enter your house foraging for food or seek shelter. Understanding the behavior of ants will help you with the recommended pest control procedures outlined here. They enter through the smallest openings, foraging for water or food. They are in search of either sweet based food or protein/grease based foods. Once they find a food source, ants will leave a pheromone trail for other ants to follow.