An ant has a simple brain that is wired to attack a predator and defend its colony. In addition, most ants cannot see very well and rely on their antennae to smell and communicate. When an ant comes close and smells a human, it senses a predator and starts biting.
Ants fight and defend their colony in huge numbers. While attacking a predator, ants release chemical signals from their excretory system to alert more worker ants in their colony that an attack has occurred. Ants often fight to the death or until the predator has weakened and can be carried back to their nest for food.