There are two kinds of bones animation.

You can create your bones animation in MED or another editor like MAX, MAYA etc, and then import it. This bones animation consists of named scenes and is stored in the model. It's played by ent_animate and normally used for actors.

The second method of bones animation is to create it by script, and play it with the ent_bone... functions. This is mostly used for simple models with only a few bones.

How to particularly create a bones animation is explained in the MED manual or respectively in the manual of the editor you're using.

Hope this answers your questions.