The top leadership of the Church consists of the First Presidency, which is the President and his councilors, and the Quorum of Twelve Apostles. When the President dies, the First Presidency is immediately dissolved and the councilors take their place in the Quorum by seniority. Seniority is according to time in the Quorum, not age. So, temporarily, the Quorum of Twelve Apostles actually will have 14 members.
When the First Presidency is reorganized, the most senior Apostle will be ordained and set apart by the laying on of hands in a private, formal ceremony to become the new President of the Church. He will select his councilors, and they will be set apart in similar fashion.
A new Apostle will be chosen to fill the vacancy in the Quorum soon as well.
The President and the Quorum of Twelve are all Apostles, and the President's councilors have nearly always been selected from the Quorum, so they are Apostles as well, but they don't necessarily have to be.