With the recent passing of one of the Apostles in the LDS Church, how will the new Apostle be chosen to fill the vacancy?
24 And they prayed, and said, Thou, Lord, which knowest the hearts of all men, shew whether of these two thou hast chosen,
25 That he may take part of this ministry and apostleship, from which Judas by transgression fell, that he might go to his own place.
26 And they gave forth their lots; and the lot fell upon Matthias; and he was numbered with the eleven apostles. (Acts 1:24-26)
When Judas Iscariot died in Christ's time, he left a vacancy in the Quorum of the twelve in the ancient Church. When choosing a replacement for Judas Iscariot in the Quorum of the Twelve Apostles, the remaining Apostles understood the importance of the man being a witness, with the others, of Jesus’s ministry, from His baptism through His Resurrection (see Acts 1:22). The importance of this eyewitness testimony is a major theme in the early Church and the early chapters of Acts (see Acts 2:32; 3:15; 4:20; 5:32).
Anciently, casting lots was a means of making a decision. Among the Jews it was generally believed that the hand of God would direct the outcome:
33 The lot is cast into the lap; but the whole disposing thereof is of the Lord. (Proverbs 16:33).
Though the exact method of casting lots in this instance is not known, one ancient method involved each voter writing a name on a broken piece of pottery and then putting it forth to be read or counted.
The Apostles sought to know whom the Lord had chosen. A similar process is followed in the modern Church of Jesus Christ of Latter-day Saints.1
Following the calling and sustaining of Elder Robert D. Hales as an Apostle, President Gordon B. Hinckley (1910–2008) explained how an Apostle is called today:
“Under the Lord’s plan, those who have responsibility to select officers are governed by one overriding question: ‘Whom would the Lord have?’ There is quiet and thoughtful deliberation. And there is much of prayer to receive the confirmation of the Holy Spirit that the choice is correct.
“… In filling that vacancy, each member of the First Presidency and the Quorum of the Twelve was at liberty to make suggestions. I am confident that in every case, there was solemn and earnest prayer. A choice was then made by the First Presidency, again after solemn and serious prayer. This choice was sustained by the Council of the Twelve. Today, the membership of the Church in conference assembled has sustained that choice.
“I give you my testimony … that the impression to call Brother Hales to this high and sacred office came by the Holy Spirit, by the spirit of prophecy and revelation. Brother Hales did not suggest his own name. His name was suggested by the Spirit” (“God Is at the Helm,” Ensign, May 1994, 53–54).
Concerning the vacancy left by Elder Perry: the remaining Apostles will gather, and inspired by the spirit, they will put forth names of men they feel should fill the vacancy-typically they look at those men who are currently serving as a Seventy, but their prior callings are less important than their worthiness. The Apostles will then fast and pray, and discover whom the LORD has chosen. When the Apostles are in unanimous agreement that they have learned whom the Lord would have to fill the vacancy in the Twelve, and it has been confirmed by the Holy Ghost, they will then extend the call to that man, and his name will be put forth before the church at the next General Conference for their sustaining vote.
After he has been sustained, he will be ordained as an Apostle of the Lord by the laying on of hands by all of the other apostles, and serve in that calling for the rest of his life.
As with any leadership position in the Church, the calling of an Apostle is extended through revelation, by the leadership with the authority to call someone to the position, and a candidate does not apply or campaign for it.
The new apostle will be chosen by the First Presidency, a council made up of the President of the Church and his two councilors, who meet and prayerfully consider one or more candidates. They deliberate and pray together with the remaining Apostles, until they have reached a unanimous decision, and then the new Apostle is interviewed by the President of the Church and extended a calling.
This calling is then presented to the Church for a sustaining vote according to the principle of Common Consent, most likely at General Conference, (the next one will be in October), and the new Apostle is ordained afterwards and begins to serve.
NOTE: Researching this, I was unable to find official sources detailing the process. This answer draws upon articles in the Encyclopedia of Mormonism, created and maintained by BYU, and MormonWiki, run by the nonprofit More Good Foundation, dedicated to LDS outreach and evangelism on the Internet. Both strive for factual accuracy but specifically disclaim official doctrinal status. Also, from personal experience, the process described in this answer is consistent with the calling of individuals to leadership positions at more local levels of the church. If anyone can find official publications of the Church on the subject, feel free to edit it in.