A formicarium or ant farm is a vivarium (an area, usually enclosed, for keeping and raising animals or plants for observation or research) which is designed primarily for the study of ant colonies and ant behavior. Those who study ant behavior are known as myrmecologists. Ants are eusocial (with the highest level of organization of animal sociality) insects of the family "Formicidae" and belong to the order "Hymenoptera".

Ants form colonies that range in size from a few dozen predatory individuals living in small natural cavities to highly organized colonies that may occupy large territories and consist of millions of individuals.

The name "ant farm" is commonly given to ant nests that are kept in formicarium; these formicaria are formed so scientists can study by rearing or temporarily maintaining them. The formicarium was invented by Charles Janet, a French entomologist and polymath, who had the idea of reducing the three dimensions of an ant nest to the virtual two dimensions between two panes of glass. A formicarium is made thin enough so that the tunnels and cavities made by the ants can be seen and their behavior can be studied. The fill material is typically soil, loam, sand, vermiculite, other mineral fragments or sawdust.

More Info: en.wikipedia.org