That depends on the constitution of the country. As you have not been specific about the country, it is not possible to be more helpful.
Vice President
the speaker of the house.
Secretary of State
the speaker of the house
Speaker of the house
Secretary of state.
Vice Pres
The Speaker of the House of Representatives.
Sec. of State
If the president is no longer able to be president the vice president steps in and becomes president.
The new president gets to choose but the senate has to confirm.
The Vice President will take the immediately responsibility.