Weapons are divided into four "colors": Red (fire), Green (wind), Blue (thunder), and Colorless. Red weapons include swords and fire tomes, Green weapons include axes and wind tomes, Blue weapons include lances and thunder tomes, and Colorless includes weapons such as bows, daggers, and colorless tomes.
Red weapons beat green weapons, green weapons beat blue weapons, and blue weapons beat red weapons. Colorless weapons are neutral to all weapon types, though there are a few weapon abilities that give favorable matchups against them, such as Blárraven. Combat with an enemy that you have a favorable matchup against (i.e. your sword unit vs. an enemy's axe unit) will give your unit a 20% bonus in damage given, and a 20% reduction in damage taken.
Some weapons have abilities or attributes that make them particularly effective against certain unit types. Such weapons will have the label "Effective against x units", where "x" is the unit type it will do bonus damage to. When matched against the correct unit type, the weapon will do 1.5x damage.
The possible unit types are infantry, cavalry, armored, and flying. A unit's type may be seen on its Status page, to the right of their level. There is also an unlabeled "Dragon" unit type - these are the units who transform into dragons (i.e. Tiki and Nowi). These units are labeled as infantry on their status pages, but receive the extra damage from weapons that are effective against dragons, such as Marth and Lucina's Falchion.
In a battle, you may see which enemy units will deal or receive effective damage from any of your units by tapping on them. Enemies that your selected unit will deal effective damage to will have a green checkmark on top of them, while enemies that your selected unit will take effective damage from will have a red exclamation mark on them.