The angel who appeared to Alma (v. 14) was the same one who called him to repentance when he was seeking to destroy the church founded by his father (see Mosiah 27:11–16). Mormon later gives the purposes of the ministering of angels.
30 For behold, they are subject unto him, to minister according to the word of his command, showing themselves unto them of strong faith and a firm mind in every form of godliness.
31 And the office of their ministry is to call men unto repentance, and to fulfil and to do the work of the covenants of the Father, which he hath made unto the children of men, to prepare the way among the children of men, by declaring the word of Christ unto the chosen vessels of the Lord, that they may bear testimony of him. [Moroni 7:30–31]
On the occasion of the angel’s second visit to Alma, he prepared him to bear testimony of Jesus Christ. Alma’s faithfulness in keeping the commandments had made him a chosen vessel of the Lord (Alma 8:15), one of the purposes given by Mormon above for the ministering of angels.
His audience was again to be the people of Ammonihah, but this time he was to warn them of impending destruction (v. 16). The Lord never destroys a nation “save it were foretold them by the prophets of the Lord” (2 Nephi 25:9). Again, the influence of Satan was evident. Satan is trying, through his followers, to destroy the freedom of man that God desired his people to have (Alma 8:17; see also Moses 4:1–4).