A crucial step in the evolution of complex organisms is the appearance of multicellularity. Key questions are “how did multicellularity evolve? Did it evolve once or multiple times? How did cells make the transition from life as a solo cell to associating and cooperating with other cells such that they work as a single, cohesive unit?”
It turns out that the shift from a single-cell system to a multi-cell one is a fairly complicated process in which cells have to undergo changes in shape, function, structure, and development.
However, there are certain sets of requirements that must be met in order for multicellularity to evolve. These include that cells must adhere to, communicate with, and cooperate with each other, and that cells must specialize in their functions (i.e., that not all cells do exactly the same thing, otherwise they would just be a group of cells or a colony). In order to make these things happen, cells must not reject each other. In other words, they must be genetically compatible to some extent—analogous to how our human bodies reject foreign items that are not recognized by our cells.
But despite what seems to be quite serious obstacles to be overcome, it has occurred independently a surprisingly large number of times.
Defined in the loosest sense, as an aggregation of cells, multicellularity has evolved in at least 25 lineages. However, even when defined more strictly—requiring that cells be connected, communicate, and cooperate in some fashion or another—it has still notably evolved once in animals, three times in fungi, six times in algae, and multiple times in bacteria.
This shows once again that, like with the eye, what seems to be an insurmountable evolutionary problem can be overcome. (Richard Dawkins’s book Climbing Mount Improbable gives more such examples.)
You can see the paper based by Karl J. Niklas on which the above article is here.