If you are a permanent resident of the U.S. (not a conditional resident), your status does not expire: You are a U.S. permanent resident for life (or until you do something that causes your residence rights to be taken away, such as committing a crime or living for too long outside the U.S.).
However, the physical green card that proves your U.S. residence does expire, every ten years. When the expiration date on your green card is six months away, you will need to apply to renew it. If that date has already passed, apply as soon as possible.
The application process requires filling out and submitting USCIS Form I-90. You can also submit this form to USCIS online—though you will need the technology to scan in your supporting documentation, such as a copy of your green card. (See USCIS's tips for filing online.)
In Part 2 of the form, check either 1a or 1b, and 2f in section A. Don’t check any other boxes in Part 2.
You will need to pay a fee for this application. USCIS fees are in transition.
Until October 2, 2020, the fee is $455 plus $85 for biometrics (fingerprinting, photographing, and electronic capture of your signature). Starting on October 2, 2020, the fee goes down to $415, plus $30 for biometrics.
(Always check the USCIS website for the latest fees.)
You must pay by credit card if filing online, though if you file by mail, your options include by check, money order, or by filling out and submitting USCIS Form G-1450, Authorization for Credit Card Transactions.
You will be called in for a biometrics appointment at a USCIS Application Support Center (ASC) some weeks after submitting your renewal application. Your fingerprints will then be checked against an FBI database. If any crimes are found on your record that could make you deportable from the U.S., you could be placed in removal proceedings and lose your right to U.S. residence. See a lawyer if you have any concerns about the contents of your FBI record.
Form I-90 comes with a fairly complete set of instructions, and you can read more on the USCIS website.
Note that Form I-90 is also the one you would use if your green card was lost, stolen, or destroyed before the expiration date. See How to Get a New Green Card If Yours Has Mistakes or Is Lost or Stolen for more on this topic.
If you are ready and eligible to apply for U.S. citizenship, you can submit the citizenship application instead of renewing the green card. USCIS does not mind if you carry around an expired green card once you have the N-400 application for naturalization on file. If you need to change jobs or travel outside the U.S., however, you will probably want to renew the green card, to prove to the rest of the world that you are still a permanent resident.
You don’t have to have an unexpired green card to apply for citizenship, but you will need a copy of the expired green card if that’s all you have.
For more information on the naturalization process, see the articles under How to Become a U.S. Citizen.
If you are a conditional resident of the U.S., the two-year expiration date shown on your card is more than a mere date upon which the card stops being valid—it is the date on which your entire status in the U.S., and right to remain here, expires unless you take steps to do something about it.
Two categories of green card applicants start out as conditional residents: spouses of U.S. citizens whose marriages were less than two years old at the time of their approval for U.S. residence or entry to the U.S. on an immigrant visa; and investors who gained their U.S. residence in category EB-5 of the visa system.
For details on the process of applying to convert from conditional to permanent resident status, see U.S. Immigration Made Easy, by Ilona Bray (Nolo).