Squatters are not tenants. Squatters occupy premises without the consent of the person who is legally in possession (typically the owner). Some ‘squats’ are relatively comfortable and well-organised (and may aim to make a political point about the short supply of affordable housing); others are not, and may be hazardous.
As a squatter, you do not have a legal right to occupy premises: you are a trespasser, and can be removed. The owner (or other legal possessor) of the property may evict you themself, and use reasonable force to do so. Also, the police may become involved. If your presence, or your eviction, may cause a breach of the peace, the police may act to prevent the breach of the peace, including by evicting you themselves. You may also be arrested and prosecuted for offences under the Inclosed Lands Protection Act 1901(NSW): in particular, unlawful entry on inclosed lands (section 4).
Under the property law doctrine of ‘adverse possession’, if you manage to keep possession of a property against the legal possessor for 12 years (that is, without their consent, and without being evicted by them) you may get legal title to the property. Yes, you may now be the owner of the property.
Adverse possession must be ‘open, not secret; peaceful, not by force; and adverse, not by consent of the true owner’ (Mulcahy v Curramore Pty Ltd 2 NSWLR 464). Also, if it relates to land under Torrens title, the land claimed must be the entirety of the title and you must make a successful ‘possessory application’ under the Real Property Act 1900(NSW) (sections 45B-45K). This is the holy grail for squatters and law students alike and, particularly in relation to ordinary urban housing, is almost impossible to do.