Pouring scalding hot water on an anthill usually gets rid of ants. The problem with this method, however, is that the hot water kills any plants that it touches, including grass. So you might get rid of the ants, but you will also have a bare spot in your yard for a long time.
I’ve learned how to kill fire ants successfully by using dry molasses, which is available online and in many garden centers. Heavily sprinkle dry molasses on the anthill, and the ants will be gone in a day or two. I haven’t been able to get rid of other types of ants with dry molasses — only fire ants.