A foreclosure auction buyer must evict occupants who refuse to vacate. Which post-foreclosure eviction process is applicable will depend on the type of foreclosure (trustee sale, sheriff sale, or tax foreclosure) and the type of occupants (former owner, or tenants).
Most foreclosures are conducted as a trustee sale under a deed of trust (aka mortgage). The statute that governs trustee sale foreclosures specifically allows the foreclosure purchaser the right to obtain possession via an unlawful detainer action, which is what most people are referring to when they speak an eviction.
The successful bidder at a trustee sale must serve a post-foreclosure notice on all occupants. The contents of this notice are mandated by statute. Failure to serve the post-foreclosure notice may cause a problem if the purchaser needs to evict occupants from the foreclosed property.
The trustee sale buyer is legally entitled to possession against the former owner and other non-tenant occupants twenty days after the trustee sale. The trustee sale purchaser must give any tenant at least sixty days notice to vacate. If anyone—owner or tenant—does not vacate, the purchaser cannot just change the locks. Instead, the purchaser must go through an eviction process in court (aka unlawful detainer action).
Other types of foreclosure—sheriff sale or tax foreclosure—may require an ejectment action, rather than an unlawful detainer action.
If you have purchased foreclosed property you are encouraged to seek a consultation with an eviction attorney.
 RCW 61.24.060.
 Puget Sound Inv. Group, Inc. v. Bridges, 92 Wn. App. 523(1998).