Your Arizona driver license has an expiration date indicated on it. You will not receive any notice from the Arizona Motor Vehicle Division ("MVD") that it will expire, so you must keep track of it yourself. If it is about to expire, you should have the driver license renewed if you intend to drive again. Even if you don't drive anymore, you should still get an official Arizona ID card if your Arizona license has expired.
There are many things that you can do online at MVD, but renewing an Arizona driver license is not one of them. If you need a duplicate license because yours is lost or damaged, you can order that online, as long as the license has not expired.
To renew your Arizona driver license, you must actually appear at an MVD or third party service provider office in person. You will need to take a new photo, pay a fee, and, in some cases, take a vision test. When you arrive at MVD, get the Driver License/Identification Card Application. You'll need that along with your current driver license. I'd bring a second form of ID just in case, because sometimes they may ask for it. A passport always works, but if you don't have a passport check the list of acceptable forms of identification for MVD.