No, there are no magnets in there. The ball is rolling just the way you see it.

This illusion is the work of mathematics professor, Kokichi Sugihara, from Meiji University and, if you're wondering how he did it, the video below where he swaps the perspective of the illusion briefly to show you the other side of the sculpture will explain just how the illusion works:

But, that only reveals how the design works. The real key to understanding this and the more than 100 other illusions Sugihara has put together with the help of a computer program he wrote may lie in the mind's expectations of geometry.

Erica Klarreich writing in Nautilus explains:

Sugihara believes that there's a simple reason why his illusions appear so baffling: We are primed to perceive right angles, even when they do not exist. Many of the most compelling impossible pictures involve structures in which there are only three different directions of lines. When that happens, we seem to have an irresistible urge to perceive the three directions as mutually perpendicular wherever they meet.

Sugihara has tested this hypothesis by instructing his program to select the three-dimensional interpretation with the most right angles. Usually, he said, this makes the computer pick the same solid that humans perceive, supporting the hypothesis. When there is more than one solid with the maximal number of right angles, Sugihara suspects that the human visual system uses lighting cues to decide among them. The visual system tends to interpret brighter surfaces as facing upward and darker surfaces as facing downward, he says. Sugihara hopes eventually to build a module onto his program to test this guess.

You can read the whole article — and check out some of Sugihara's surreal illusions — right here.