First you've got the head. This is an NPC that keeps track of the actual life of the NPC and functions as the main AI source.
Then you've got two other NPCs: A body part and a tail part. In the AI of the head, both these other NPCs are created upon spawning (the body parts are obviously created multiple times).
Now each part (except the head) holds a value that represents the index of the npc before it in the Main.npc array so it can get the position and rotation of that NPC, thus making it able to follow it.
Don't know if this was the explanation you're looking for?