We had a Hyundai salesman explain leasing to us a while back, simply. They calculate the expected value of the car three years out versus the sales price and you pay that amount (plus interest). They were promoting a 0% lease option at the time, which made no sense to me, but does now.
If you buy a Porsche for example, depreciation is relatively small so leasing can appear to be a very good option for that one.