If there is a current lease, you typically need to buy the property subject to the lease. Having a lease, the tenants have the legal right to occupy the property until their lease is finished. Sometimes, you can simply ask the tenants if they will move and hey might just go ahead and do it. Another option sometimes used is a new owner will offer the tenant some money in order to vacate the property and terminate the lease. If they will not leave, you will need to wait until the end of their lease before you can occupy the property. You will also want to check with your lender and insurance company before completing the sale and removing contingencies.
If you do decide to continue with the purchase and they will not be moving out, you will want to get a copy of the lease and check local landlord-tenant laws to make sure you follow the rules when the time comes. You will likely need to notify them upwards of 60 days that you will not be renewing their lease. Landlord-tenant laws vary between localities, so be sure you do your research to see what is needed in your area.