Have you closed escrow, and the former owners or tenants are still occupying the property?
If not, then refuse to close escrow until the property is vacant.
If so, and you agreed to purchase as-is, then you may be liable to handle the eviction yourself.
Did you have an agent representing you? If so then have him or her explain the situation and your options.
If not, check with an eviction service or an attorney, they will be able to provide you with everything you need to know, and most likely be able to handle the eviction process for you.
If you have closed escrow and did not realize that there were occupants in the property and it would not be vacant at the time of closing, then someone failed to disclose the facts properly to you.