Ants are one of the few insect groups (including ants, bees, wasps, and termites) which have developed "eusociality". Social insects are those that lives in colonies and exhibit group integration, division of labor, and overlap of generations (Brittanica).
Different groups of individuals specialized in different behaviors within the society as also called "castes". In ants these castes include queen ants, males (drones) and sterile females (workers). However, in some species there might be more than one castes of workers. Frequently, these are separated into "major" (or soldiers) and "minor" workers with major workers having larger heads, jaws and/or body size. See in picture below a major (left) and a minor (right) female worker of the alien species Pheidole indica.
Workers are responsible for the provision of food to the colony, taking care of the brood (ant larvae) and building the ant nest. On the other hand, the only function of male ants (drones) is to mate with the queen so she can lay her eggs. The queen is the central part of each nest, she is the founder of the whole colony, and her role is to lay eggs. In some species of ants only one one queen can be found per nest although in other species each nest contains multiple queens (polygyny).
In some cases, some species of ants do not even have colonies or nests! These species are commonly social parasites. In social parasitism two or more ant species co-exist in one nest or colony. The one species is the parasitic species (which is dependent on one or several host species) and the other(s) is the host species. Social parasitism, may have plenty of forms where different species may co-exist without or little engagement or alternatively with one species negatively affecting the other. An extreme case of social parasitism are the slave-making ants (dulosis from the Greek word δούλος = slave).
Some slave-making ants may be able to survive without the support of slaves of their host or be completely dependent on their host. In the latter case, these slave-making species may not have worker ants at all or these may be present in only in low numbers. In ant species that do not have workers at all, their queens kill the host colony queen! A different approach can be observed in workerless inquiline species, where the queens live in queen-right host colonies.
As partially explained above each ant starts its life as an egg layed by the queen ant. Eggs develop into larvae, a worm-like stage which it taken care of by worker ants. Larvae pupate (the analog of cocoon in butterflies) and in turn the pupa is transformed into the adult ant.
*Note that there is no such thing as a "baby" ant or an "adult" ant in terms of size. Each ant you see walking around is an adult and its size does not change during its lifetime. The "baby ant" is in fact the worm-like larvae inside the ant nest.
The pupa can become either a new queen ant (fertile female ant), a worker ant (sterile female) or a drone (fertile male). To understand why this happens we need to talk a bit about genetics, the DNA of these ants.
(photograph taken from: https://askabiologist.asu.edu/individual-life-cycle)
Let's take things from the start!
In ants sex is determined differently than us humans. The DNA of a queen ant includes two sets of chromosomes, one set from a male ant (her father) and one set from a female ant (her queen mother). This queen produces two kinds of eggs. (1) eggs that are unfertilized and (2) eggs that are fertilized. Unfertilized eggs include only one set of chromosomes (the queen's DNA), while fertilized eggs include two sets (one from the male drone and one from the queen).
What happens is that unfertilized eggs will only produce male drones. Thus, every male ant has only one set of chromosomes, one set of genes! This phenomenon observed in all Hymenoptera (ants, wasps and bees) is known as haplodiploidy.
Fertilized eggs, having two sets of chromosomes will always be female. But what makes a female ant become a sterile worker or a fertile queen is how a larva from a fertilized egg is nourished or fed. Although this is not always the case, a richer diet of a larva in protein can make her develop into a queen ant!
Now that this is settled let's get back to our colony.
Worker ants will feed and take care of the colony, male ants will mate with the queen and the queen will continuously lay eggs to help her colony grow. As you might have seen in the photographs male ants and queen have wings. However, queens don't get to keep that throughout their lives. Winged queen are also called "alates".
Each new adult queen might fly away to build her own colony performing her so called "nuptial flight". During this event, males and alate queen will fly out of their nest and mate. Once the queen has mated she will chew off her own wings, leaving behind scars in the part of the thorax where these were attached! She will find a place to found her colony and lay her first fertilized eggs, which will produce thee colony's first workers.
Camponotus queen
Can you spot the wing scars?
If you want to learm more on how to differentiate between drones, queens and worker ants check this video out by AntsCanada!