Around the world, ants are the main predators of termites.  When you see termite soldiers, most of the funny-shaped jaws or pointy or blocky heads are effective adaptations against ants.  When termites fly, lots get eaten before they can create a safe nest.  This makes life very hard for termites, but usually not so hard as to kill them all off.

The battles between ants and termites have been raging for millions of years, with no clear winner. It's good to have ants around your home as these make things hard for termites, especially those just starting new colonies but because termites are good at surviving ant attacks, the mere presence of lots of ants is no guarantee that you won't get termites.  Ants are useful, but not reliable, predators of termites.