Ants are opportunistic, so the golden rule is not to leave food lying around and keep food storage containers and dustbins tightly sealed. Liane Schmidt from gomestic.com suggests putting vinegar in a spray bottle and spritzing the areas where they appear. They hate it and it also removes the invisible trail that ants leave behind so other ants won't be able to follow it.
Ants also don't like ground cinnamon, black pepper and cayenne pepper so you could try sprinkling these spices at their entry points into your home.
Another tip is to plant a border of mint or spearmint around your house; it's a natural repellent and will make your home smell great.