Answer:
When the the Prophet of the Church of Jesus Christ of Latter-day Saints (commonly called the "Mormon" Church) dies, the First Presidency is dissolved, meaning there is a quorum of 14 Apostles and no First Presidency. The senior Apostle (usually the President of the Quorum of Twelve Apostles) generally becomes the next Prophet.
As in the recent case of the death Gordon B Hinckley, his First Councilor Thomas S Monson was at that time also the Senior Apostle and the literal President of the Quorum of the Twelve Apostles. Thomas S Monson is now the new Prophet of the Church of Jesus Christ of Latter Day Saints. Brother Packer who was Acting President of the Quorum of The Twelve is now the senior Apostle and President of the said quorum.
Nevertheless, rather than just select the man who is next in apostleship seniority into the position, each Apostle takes time and prayer to seek the will of the Lord concerning the issue - to be sure that he is the right man for the leadership. Because the calling is received through revelation from God to each individual apostle, each receives the same Heavenly guidance from God and the decision is thus always unanimous. The new Prophet is then brought before the general membership of the Church at the next General Conference for a sustaining vote - so that all things in the Lord's Church are done with 'common consent'.