According to Article II Section 1 of the United States Constitution, only those who are at least 35 years old are eligible for the presidency. In addition, only natural born citizens who have resided at least 14 years in the United States can become president.
The Founders' rationale for these criteria included protecting the young republic from foreign influence. By adding the natural born citizen clause, the Founders sought to prevent ambitious foreigners from usurping the powers of government. They believed that the higher age barrier and the residency requirement would ensure that presidential candidates had some degree of experience, wisdom and knowledge of the country.