When hovering over a unit that is considered to be built, the type of unit it says it is good against is what it will likely have a positive multiplier against. A unit good against cavalry (e.g a Doppelsoldner) will have multipliers against cavalry. Keep in mind that different units have different amount of multipliers for a different type of unit class.
This function works the same way as rock, paper and scissors where each unit has certain weaknesses and strengths that balances other units to avoid major edges during a battle.
If a unit has a 5x multiplier against heavy infantry, then it takes the units base damage and multiplies it by 5 to heavy infantry. Units can also have negative multipliers as well. If a unit has a 0.5 multiplier against Villagers then it only does half of that base damage to villagers.