A pair of ants typically mates in the air when a male inserts his aedeagus (analog of a penis) into a female's reproductive tract and deposits sperm. Here, southern wood ants pair up during their nuptial phase.
Ants are social insects belonging to the order Hymenoptera, which also includes wasps and bees. And though people typically don't think of ants as flying insects, ant sex is often a crowded, aerial event not so different from the mating flights of honeybees.
Ant society is divided into several castes, including workers, soldiers, drones and queens. Workers and soldiers are flightless females that take care of the colony. Drones, which develop from unfertilized eggs, are winged males born with the sole purpose of procreation. Breeding females can also fly — they become queens after mating, breaking off their wings and starting a new colony (or joining a multi-queen colony).
For the rest of the story: http://www.livescience.com/37782-animal-sex-how-ants-do-it.html