If walking barefoot through your yard simply isn't feasible because there are thousands of ants already doing it, you may have a bit of a problem going on. Ants never simply detour through your yard to take the scenic route. Instead they bring everyone they know--as ants are very social--and set up camp. With a few safe and simple tricks you can send these tiny squatters packing.
Sprinkle boric acid around ant hills that are in dry areas away from your home. The ants will mistake the toxic bait for food and bring it home, killing many of them off.
Fill a large container with soapy water and pour it into their anthill. Use a shovel to loosen the soil and help the soapy water to reach further into their home. The soap will help to kill the ants. You may find that scalding water has a similar effect. Do this as many times as needed to scale back your ant population. Eventually they will move on.
Dig up their anthill with a long handled shovel. Dig a hole right in the center of it and drop a chunk of dry ice into it. Cover the anthill back up with the dirt you just dug up and all the angry ants that were in it and leave it to sit. Their home will become quite cold rather quickly. If the queen dies off, the colony will move elsewhere.
Sprinkle dry grits around their home or in areas that they like to frequent. The ants will take the grits home and feast. Since ants can't digest this, many of them will be killed. If the queen eats it, she will also die and the survivors will pack up and leave.
Make changes to your yard to make it less appealing to ants. Cut back excess shrubbery and vegetation and clean up any spills. Make sure that you aren't providing a food source to ants by covering up your trashcan to eliminate access.