There are several steps in renewing your passport. The process can be started via mail (the easiest), in person, or through an embassy if you live abroad.
According to the U.S. government, a few things will make you eligible to have your passport renewed.
Before you get your passport renewed, you need several things to get it renewed. These items relate to doing it in the mail.
If one of the scenarios does not fit you for your passport renewal, you can do it in person.
Most international destinations would like you to have a valid passport for six months after the end of your trip.