Mastery is a new addition after the WotV anniversary 3.0.0 update that gives additional stat bonuses for certain unit groups.
Each element mastery can be increased by levelling up your units of that element. Once it reaches the required amount, it will level up and give a certain stat bonus that applies to all units that share the same element.
You can view these in the units screen, and tap the "Mastery" button at the bottom left.
In addition to the stat bonus that you get, it also gives various rewards. This can make levelling low level units worth considering if you have some spare resources.
Easy ways to level up
You can level up units pretty fast by using experience cubes, but there are 2 other easy ways to level up unused units without having to use them.
Story Mode
If you have a strong enough unit to be able to solo a story mode content, you can use it on auto to afk grind the experience. If you want to do it fast, then you can use skip tickets and fill out the party with all low level units. This method can also be faster if you do it during the unit exp up story mode event, or save your resources until then.
Chocobo Expeditions
Chocobo expeditions have bonuses to increase drop rate and exp, but you only need to put 1 of them and it will use the highest multiplier. You can fill out the rest with any unused units to level them up on the side.