Never step on or otherwise squash an ant.
And never spray an ant with a pesticide.
Ants leave a scent when they are injured or killed this way. And, that scent signals many, many more to come to the area where the ant was killed.
Vacuum them instead! They won't have a chance to leave their scent.
However, if you do squash an ant, immediately clean the area where you killed the ant with a good cleaning solution to get rid of the ant's scent.
If ants are invading your home, vacuum the ants that you see until you find out where they are entering your home. Once you discover their entryway, make a circle of petroleum jelly (Vaseline) around the opening.
Ants never walk on petroleum jelly. It's toxic to them.
Make that circle at least 4 inches in diameter. This will provide the ants with enough area to walk in and will prevent them from going further than the circle.
Put an ant poison inside the circle. The ants are sure to find it. Leave the ants alone to consume the poison. Pretty soon, no more ants.
If you have pets that are kept in terrariums or cages on stands, such as reptiles or birds, place petroleum jelly around the full circumference of the legs of the stand. This will prevent ants from attacking your pets. And, the treatment can last for years.
If your terrarium has electrical appliances in them, such as heaters or lights, simply place petroleum jelly on the wire so that ants cannot climb into the habitat via the electrical wire.
I heard that leaving bay leaves by doors and windows or wherever the ants are entering will prevent them from coming into the house.