It's called AttachToBone.
Within your modelling application, you'll be able to make a skeleton, which is exactly what you'll think it is - a body made up of bones but contains no physical model data. However, this iskeleton instead is a representation of all possible animation routines for your characters such as walking, standing, attacking, falling dead in battle, etc.
So, the modellers make body parts and pieces, which then can be dynamically loaded and assembled by the programmers to the correct skeleton bone. The programmers then run an animation, and all of the pieces move according to the skeleton. That way, you only need to make one skeleton and animation set and use it for all of your characters, instead of manually making each model and animating them separately and indivudally.
That is how character creation tools are made. The person can choose BodyA with HeadB, and the program will then assign the models to the defined skeleton bone. When animated, the software will then move the pieces of the models according to the position, rotation, and scale of the skeleton.
Obviously, the more you break down the skeleton and body features, the more complicated it is to rig the model for the player. However, if given a stock model, you can take a sword, tell it to mount it to the 'right-hand' bone, and if modelled correctly, the sword will then appear to be part of the character model and be animated with it.
Even though they were separate from each other.