You can unlock units in PVZ Heroes by using your XP in the Training Camp. Every unit has a certain amount of XP needed in order for them to be unlocked. You can also unlock units by spending diamonds.