Creature variations are a means of adding tokens/tags to creature files. It's best to think of them as a scripting language that interfaces with how a creature is loaded. The main functions are adding tags (usually only makes sense in a predefined creature variation), removing tags, and altering the arguments of a tag.
Creature variations local to a creature are mainly used to remove tags. Here is an example from the sponge man, which starts off with the full sponge raws before it.
[CV_REMOVE_TAG:NOTHOUGHT]
[CV_REMOVE_TAG:IMMOBILE]
[APPLY_CURRENT_CREATURE_VARIATION]
The game reading this will remove the nothought and immobile tags it inherited from the sponge, allowing sponge men to think and move like a normal creature.
Giant/man versions of animals get most of their traits from a predefined creature variation, but almost every creature uses predefined creature variations to add their different gaits (move speeds).
Having distinct races as part of the same species and entity would be done by having them as castes of the same creature. I don't know what differences you want, but you can assign different tags to different castes using the caste selection criteria [SELECT_CASTE:], [PLUS_CASTE:] (for selecting multiple), [USE_CASTE:] (for copying to a new one), etc.
Note: material and tissue IDs are notably used by all castes.
If you want to see raws after the effect of creature variations, [LOG_CURRENT_ENTRY] will print the raws generated after applying the creature variations in logs\current_entry.txt.