Selling a leased car is more complicated than selling a car that you own. The title to the leased car is held by the finance company. When you sign the lease you are agreeing to pay a monthly payment to cover the depreciation on the car based on your projected mileage and the interest that you are paying on the financing. It may also include the sales tax on the car and the interest on that if the tax was rolled into the lease. You should have options at lease termination. You can return the car to the dealer and pay only for any excess mileage and required repairs. Or you can buy the car for an amount that was determined at the time that you signed the lease. In that case, you can flip the car. You will get the title at the time of purchase and then you can sell the car to the new buyer the way that you would conventionally sell any car that you own.
The complication comes if you decide to sell the car prior to the expiration of your lease. In that case, you must determine the amount that you still owe on the lease and add it to the buyback price that you received when you first negotiated your lease. Take that figure and check it against the current market value of your car. You can get this from web sites like Kelly Blue Book or Edmunds. Enter all of the relevant data and ask for the private sale price of your car. If it is equal to or more than the sum of the lease payments and the buyback price, then it can make sense for you to sell.
To do so, notify the leasing company and get their permission to proceed. Sell the car to the new buyer and from the sale, make your required payment to the leasing company. They will then send you the title document to transfer to the new buyer to complete your sale.