Vector maths is a must, you shouldn't need more than the basic parts for this, but the rest is generally very recommendable for a game programmer, so if you skip the cool stuff for now be sure to get back on the topic sometime. From there you could read about ragdoll physics, though a lot of sources for that may be "heavier" than what you need, so I'll just sketch out how I presume the animation works.
It runs a set number of updates per second.
For every update it iterate over all pairs of objects.
If the objects are too close each of the two objects will be moved a little away the other.
If they are connected and too far from one another each object will be moved a little closer to the other.
In both cases, the more the distance is off, the more they should move. Try for instance moving the objects 1/10 of what they are are off the target.
It's probably best to not move the objects immediately when you do the calculation, but rather for each object sum the movement over an entire update and execute it only after the movement relative to all the other objects has been calculated.
This setup does not use velocity and acceleration as one would with common ragdoll physics, that is on purpose since the goal is to spread the nodes out nicely rather than simulate real physics.