In this post I'm going to try to explain properly how Skeletal Animation works, mostly in the context of Unity, although I'm going to present the general algorithms that lets you implement it in any engine.
A simple way to Animate
Let's assume that you already know the basics about a 3d Model in the context of a game engine.
A model has some vertices, which when connected we get triangles describing the surface of the model.
Besides a position in 3d space, vertices can have any info you need, from color to texture coordinates, normals and other stuff.
First, let's think first about 2d games. In those you have sprites, and animation is done by having multiple frames, in which characters appear in different poses.
Now if we extend this concept to 3D, we can too have "frames", instead of being separate pictures made of pixels, it would be different versions of the same mesh, each with different positions for each vertices.
We could even also have different colors per frame, or even different texture coordinates.
Also if we make sure that each frame has exactly the same number of vertices, we can mathematically blend each frame, to get smoother animation (eg: using Unity Mathf.Lerp function).
A hierarchy of Bones
Now, now, the method we described before is nice, but it requires tons of memory, also it does not allow us to create new animation in real time (eg: physics-based animation).
The alternative (and the way most game engines do animation) is called Skeletal animation. This requires some extra stuff, besides the vertices and triangles now we need bones (also called joints in some engines).
The idea behind the bones is that we just describe animation in terms of bone movement, and then using some nice code we deform the vertices so that their position somehow follows the bones. Of course, this means that each vertex now also needs to store which bone influence it.
Another nice thing about bones is that they can be defined as an hierarchy (similar to the scene hierarchy in an Unity project), meaning bones have a parent / child relationship with other bones, making their positions dependant of their parents. This is what allows you to rotate a character shoulder and the elbow and hand moves accordingly.
Now, enough with theory and let's talk about pratice. First, let's assume that the bones and weights are done by artists in Maya / Blender / etc, and are properly loaded into the engine.
By now you should have the following ready: