In Fire Emblem Heroes, you aren't likely to take advantage of this option very often (due to how costly it is) but it's worth knowing about.
You can choose the unlock potential option to increase the star rating for a character, once he or she reaches level 20. This resets that character's level to one, but makes additional skills available to learn.
Unlocking potential requires different items, depending on the existing star level. Characters with a rating from one to three can be upgraded using hero feathers (most easily won from doing exceptionally well in arena battles) and badges (your reward for clearing training tower stages). To raise a character from four to five, you will need still more hero feathers, and also great badges (also obtained by clearing training tower stages, though only at higher difficulty levels). Due to the cost associated, you should think carefully before you unlock a character's potential.
The merge allies option does precisely what the name suggests, and the resulting character gains additional SP and stats in the process.
To merge, you must have two allies with the same star rating or better, and they must also possess the same name and title. Think of it as a way to get something out of any duplicate characters you might summon.
However, you shouldn't merge when you anticipate unlocking a character's potential, because stat boosts disappear at that time. You're better off waiting to merge until your character has a five-star rating, so that any benefits stick around for good.