Well i'm no expert but i'm doing a bit of this at the moment. It depends what you want to do exactly... in particular if you want to be able to Design the new unit.
For example, if you want something like the Cult of 1000 Eyes ability, where it lets the faction train spiders in cities (but not "design" the spiders, i.e. customise their abilities/equipment) then it's relatively easy. Have a look in CoreUnits.xml and you'll see the Unit_BoundWidow and other trainable spider units... note they have a prereq like this:
<Prereq>
<Type>AbilityBonusOption</Type>
<Attribute>CultofaHundredEyes</Attribute>
<Target>Player</Target>
</Prereq>
So if you want to be able to train dragons, you could copy the UnitBoundWidow entry in CoreUnits and change it to a dragon (copy relative textures, stats etc from a Dragon in CoreMonsterUnitTypes.xml file).
That's basically it.
If you want to be able to design the unit as well, it gets a bit more complicated. Basically to make the unit designable you add <CanBeDesigned>1</CanBeDesigned> to the UnitType. That's simple enough, but bear in mind that giving a unit armour/weapons might cause problems if it's not based on the standard K_Male_Skeleton_01 skeleton. Just have a look at how Slaves, Henchmen and Jugs are setup in the CoreUnits.xml and it should make sense.