It depends on what specifically you're asking. There are three ways to interpret your question, and each has a different answer:
1: You want certain units to start with your custom promotion. (Typically the case with civ-specific Unique Units, but occasionally pops up in other ways.)
In the CIV5Units.xml file, there's the <Unit_FreePromotions> table. This governs the "free" promotions that various unit types get when first created. If you want to make all tanks get the Blitz promotion, for instance, you'd add a new Row:
Code:
<GameData>
<Unit_FreePromotions>
<Row>
<UnitType>UNIT_TANK</UnitType>
<PromotionType>PROMOTION_BLITZ</PromotionType>
</Row>
</Unit_FreePromotions>
</GameData>
Note that this is done by unit type, so you'll have to add similar entries for things like the German Panzer UU, since it replaces the Tank for that empire.
2: You want the custom promotion to be selectable when your units level up.
In the CIV5UnitPromotions.xml file, there's a table <UnitPromotions_UnitCombats>. This table tells the game which types of units are eligible to take each promotion. So, for instance, if you make a new "Commando" promotion that's selectable by Gunpowder units (Musketmen, Riflemen, Infantry, MechInfantry, and their various UU substitutes), you'd add
Code:
<GameData>
<UnitPromotions_UnitCombats>
<Row>
<PromotionType>PROMOTION_COMMANDO</PromotionType>
<UnitCombatType>UNITCOMBAT_GUN</UnitCombatType>
</Row>
</UnitPromotions_UnitCombats>
</GameData>
So you add one Row for each combat class (Gunpowder, Armor, Helicopter, Mounted, Archer, Melee, etc.) that you want to be eligible to take your promotion. And no, there's no easy way to combine the declarations.
Now, this'll still depend on the prerequisite promotions you gave in the promotion's main table, and any tech prerequisites it has. One downside is that you MUST give it to all units within a given Combat Class, so you can't make a promotion that's only selectable by the Modern Armor but not the Tank, because they both share the Armor combat class. (You could create a new combat class for the MA, but that'd then break the Ambush promotion unless you doubled its effect as well.)
This is very annoying if, for instance, you want to add a ranged unit to a combat class that focuses on melee combat, like say a horse archer unit... if you make it Mounted, then it can't take ranged promotions (or if you make it so that it can, then all of the other mounted units can as well), and if you give the Archer combat class instead, then it won't get the mounted bonus from the Stable or the Mongol trait.
There IS one way around this: have the promotion require a promotion unique to a specific unit. For instance, if I made a flying tank, something that's type Armor but has the Hovering Unit promotion (which helicopters have), I could make a promotion that requires Hovering Unit but is only selectable by Armor units. Non-hovering armor units would never meet its prerequisites, so it'd only be selectable by the flying tank unit type I added.
The problem with this is that promotions generally use an OR prerequisite, so you wouldn't be able to have the promotion depend on any others besides that one unique one.
3: You want EVERY unit to get this promotion, automatically.
For instance, in my mod I created a "Home Field Advantage" promotion that gave every unit +10% when fighting within friendly territory, doubling to +20% when attacking within friendly territory. This promotion was intended to help blunt the massive late-game conquering sprees.
There are two ways to do this:
A> Treat the Palace like a Wonder that gives a custom promotion:
Code:
<GameData>
<Buildings>
<Update>
<Set FreePromotion="PROMOTION_HOME_FIELD"/>
<Where Type="BUILDING_PALACE"/>
</Update>
</Buildings>
</GameData>
Note that for this to work, you'll also have to have made this promotion linked to all possible unit combat classes, as in #2 above.
B> Create a Lua event using the SerialEventUnitCreated function, where it gives the unit the promotion at the time of creation. I wouldn't recommend this one for beginners, but it's got some possibilities that the above doesn't, like keying by unit type, and you don't have to fill out all of those combat class linkages.
(If you only want one certain civ to get the promotion, then that's in the Traits file.)
------------------
So there you go, one of those should answer your question, depending on what you were actually asking.