Physarum polycephalum is one of a group of strange species called "myxomycetes." Myxomycetes are not animals; they are not plants; they are not really fungi (though they are often classified as such, because we have to put them somewhere). They are most like giant amoebae. Every Physarum polycephalum is, essentially, a collective unit with thousands of nuclei, embedded in a yellow gel.
In the "feeding" portion of the Physarum life cycle (called a "plasmodium"), the creature can flow in many different directions, in search of food (hence the name "polycephalum," which means "many-headed"). When one portion of the plasmodium encounters a good food source, that information is (somehow!) conveyed to the rest of the plasmodium, which will then swarm toward the food en masse.
If food becomes scarce, the plasmodium changes its behavior: the living material clumps into little stalks, topped with what look like clusters of black grapes. These are spore cases, which burst open to release tiny, dry spores, that drift away with the slightest air current. When such spores land in amenable conditions--with moisture and nutrients--they pop open like space capsules, and release single-celled, two-tailed reproductive cells. Two of these, finding one another, fuse together, and then grow and divide to form a new plasmodium.
Physarum has other tricks, as well. Deprived of water, the plasmodium dehydrates to the consistency of dry paint, and can remain dormant, but alive, in that state (called a "sclerotium") for months until re-hydrated. Plasmodia and sclerotia can be cut into pieces without harm. Plasmodia can "sieve" themselves through porous barriers to reach food. In search of food, plasmodia can also calculate both the most efficient routes to multiple food sources, and how much of the "many headed" plasmodium to send to each source, based on the food's size and nutritional quality.