I have tried many things over the years. The little black plastic ant traps are somewhat effective for me. Have also tried a gel type insecticide that you squirt into cracks. But starting last year I've just been using all purpose RAID House and Garden spray. I spray it along their trails - like the crack between the kitchen countertop and wall, so it goes way into there.
This seems very effective, but it's a mess because it gets all over everything and you have clear off all the counters before spraying, then clean up the overspray. I did this in the kitchen about a month ago and even now I still find a random dead ant on the counter that has passed through the sprayed cracks.
A few days ago the whole side of my house was covered with ants, hundreds if not thousands of them in an area maybe 10 feet high X 16 feet wide. I sprayed that whole area with the same RAID stuff and have not seen any since.
Ants are something to look forward to every spring. But they don't usually last too long once the weather gets hot.