It depends on the terms of the lease. It has to be bought out. There is no equity in a leased car only liability. Some dealers will help you out of the deal in a way that is fair, while others will only help you out of money.
Buying out the lease may come with a major monetary penalty. Expect such!