There are many forms of ant traps and baits. Some traps contain sweet, sticky, sugar/carb or protein-based gels that attract ants and then immobilize them, causing them to eventually die. These are some of the most common types of ant traps that people purchase because they are cheap, easy to use, and can be placed pretty much anywhere, including countertops, windowsills, tables, and mantels. Most people place them near the scene of an ant infestation but a little out of the way so ants will divert their search for food to them instead and get stuck.
Other types of baits include various formulations of boric acid or diatomaceous earth contained in a granular, powder-based product that is meant to trap or kill as many ants as possible. These traps can be laid out as bait stations, waiting for ants to walk onto them and be killed.
Different types of baits work better for different species of ants, and the product you use will likely tell you which kinds they work best for. However, it’s important to note that these baits often only kill a small number of ants at a time, and only the ants that search for food or guard the nest. If your infestation is large, it will not kill all of the ants infesting your home.