When buying or selling a property which is currently rented out to tenants, you need to understand that the lease comes (or goes... for that matter) with the property. First check the lease agreement to make sure how long the tenants can stay in occupation. The buyer will not be able to take occupation of the property before the lease expires.
Generally it is a good idea to check on the respective obligations imposed on lessor (owner) and lessee (tenant), so you fully understand what you are getting involved in, if you purchase the rented home. For example, check if the lessor has to pay any compensation to the lessee for improvements made during the lease and make sure that if there is a security deposit refundable at the end of the lease, that you get this from the seller. Finally, be aware that tenants do not always do what they are supposed to do and therefore there is always the chance that the tenant refuses to vacate although the lease has expired. This can mean legal action with costs and resultant delay, so try and ascertain directly from the tenant what their intentions are, before you buy or sell.