If your landlord in California locks you out of your apartment, removes you or any of your possessions or prevents you from entering your apartment without a warrant of eviction then it's illegal according to California civil code. Illegal evictions in California are also called self-help evictions, because in this situation your landlord would be kicking out you out of your apartment on their own instead of going through the formal (much longer, more expensive) legal eviction process.
If your landlord in California illegally evicts you, then they're liable for damages and fines of up to $100 for each day that they're in violation (in other words, that you're locked out of your apartment). To make sure this happens, you can go to the closest small claims court and ask to file an illegal lockout case.
They may also be arrested for a misdemeanor. You can call your local police precinct, who will start by looking for probable cause that you are being unlawfully evicted. Then they will try to identify your landlord and get him or her to let you re-enter the unit. If they can do that, they will prepare a summons to court.
If they cannot identify your landlord properly, or if your landlord refuses to let you back into the apartment, then the officers may arrest him or her. They may consider pressing charges against your landlord for trespassing—a misdemeanor in California.
The information provided on this website does not, and is not intended to, constitute legal advice.