How often (and under what conditions) are airliners resold to another organization with...less stringent qualifications? Is there a certain number of hours after which an airliner has to be retired or something? Or is it just that airlines like to buy new and shinier airplanes on occasion?

Further, when an aircraft is being resold, are there any particular procedures that have to be followed? And are there different levels of airworthiness involved (ie., you have a lower litmus test if you are just selling it off to be used as a cargo plane or private plane?)