The Constitution also gives a maximum amount of time someone can be president regardless of being elected or not, a maximum of 10 years.
The amendment was passed by Congress in 1947, and was
ratified by the
states on February 27, 1951. The Twenty-Second Amendment says a person can only be elected to be president two times for a total of eight years.
It does make it possible for a person to serve up to ten years as president. This can happen if a person (most likely the
Vice-President) takes over for a president who can no longer serve their term. If this person serves two years or less of the preceding President’s term, he or she may serve for two more four-year terms. If he or she served more than two years of the last President's term, the new President can serve only one full four-year term. Under the language of the amendment, the President at the time of its ratification (Harry Truman) was exempt from the two-term limitation. Truman served nearly all of Roosevelt's unexpired fourth term and then was elected President once, serving his own four year term.
simple.wikipedia.org