The 25th Amendment deals with succession of the presidency and
filling vacancies for the Vice President. This entails that when the President dies, is removed from office, or resigns, the Vice President takes over. When there is a vacancy in the office, a new Vice President is elected by the President nominating a successor, who becomes VP if confirmed by a majority vote of both Houses of the Congress. The VP also takes over when the President writes a written agreement that he is unable to fulfill his duties. And lastly, if the Vice President feels the President is unable/disabled to discharge the powers and duties of his position, then he, or the principal officers of the executive departments, or of such other body as Congress may by law provide, may write a written declaration.
There are potential problems associated with this because it leaves the option to declare Vice Presidents disabled unaddressed. Another scary problem is, that because almost every vice president nowadays is chosen to appeal to voters, rather than on skill, we could potentially have a leader who is unfit to run.