There are three options:
1) You can renew the lease, usually in 5 year increments.
2) The leasing company will come and take system off roof at no charge.
3) The leasing company will sell you the system at fair market value. Realistically, that value will be low, not because the system is of low value in 20 years, but because it is more cost effective for the leasing company to sell the system to the customer at a dramatically discounted rate than it is for them to come remove it from the roof.