Presidential disability is automatic if the president dies, resigns or is impeached, but in other situations, the vice president and a majority of department secretaries must contact the Speaker of the House and the President Pro Tempore of the Senate, stating the the president is no longer capable of remaining in office. The president can then dispute the charges, if he or she wishes to. A subsequent decision by Congress will determine whether the president will remain in office or not.
If the president disputes the allegations made by the vice president and department secretaries, one of two things will happen: The president will continue performing his or her duties or the vice president will re-submit the declaration of disability. Regardless of whether or not the president disagrees with the vice president and department secretaries, Congress must decide if the president should stay in office or not.
Under the 25th Amendment, the president is also given the right to declare himself or herself disabled and can step down from office if he or she cannot perform presidential duties.