You must apply for a passport in your home country at the government office which has jurisdiction over your place of permanent residence. The passport must be valid for travel at least six months beyond the date of your initial entry into the USA. While you remain in the USA, you must keep your passport valid in order to retain your F-1 non-immigrant student status. If your passport needs to be renewed while you are present in the USA, you may contact your country's embassy or consulate which has jurisdiction over the state in which you are currently pursuing your educational program.
U.S. citizens who need to apply for or renew a passport, may find instructions for doing so at their local passport office, or on the U.S. State Department website.