Food and water attract ants. Different ant species prefer different types of food, but most of them eat organic matter or nectar. This means that anything from household and garden waste to spilled soda can attract ants.
Once an ant finds a food source, it carries morsels back to the nest and marks its trail with pheromones to allow others to find the food. Cleaning up spills and washing dishes immediately, keeping cupboards, pantries and baseboards clean, emptying trash cans regularly and not leaving pet food standing all help to reduce ant activity. Similarly, cutting grass and garden plants back to prevent contact with the house, keeping porches and gutters free of debris and fixing water leaks to eliminate moist areas are effective ant control measures.