This black stuff is called ferrofluid . Ferrofluid is pretty much nano particles of magnetic material suspended in a carrier fluid and a surfactant to keep it from getting clumpy. When there is no magnet around this fluid is fairly thin and quite messy but once you get the right magnetic alignment, these strange shapes emerge. I don’t happen to have very strong magnets, so I did what I could including getting all over everything ! This stuff has a mind of it’s own if you’re not paying attention to where your magnets are lol
Ferrofluid has many other uses besides making an interesting subject for photography. They are used in speakers, the aerospace field, medicine ( as contrast agents ) and many kinds of optics. Pretty multi purpose stuff huh?