Squatting is when someone deliberately enters property without permission and lives there, or intends to live there. This is sometimes known as ‘adverse possession’. Squatting in residential buildings (like a house or flat) is illegal. It can lead to 6 months in prison.
Generally, under United States law, the owners can have a squatter evicted for violating loitering or trespassing laws, unless the squatters can establish that they have tenants’ rights, or can gain adverse possession due to the property having been completely abandoned by the owner.
These protections are not valid if the possession of the property is done in secret.California adverse possession laws require at least five years of possession and payment of taxes throughout that period in order to be eligible for legal title. State adverse possession laws can vary significantly.