Trespass can be a form of unlawful entry by the landlord if the entry is made without the tenant’s consent
When a landlord enters a tenant’s apartment without permission, the tenant is technically a trespasser and has committed the tort of unlawful entry.
However, if the rental lease signed by the tenant expressly reserves the right of the landlord to enter the tenant’s premises in cases of emergency or to make scheduled repairs and maintenance, then under those conditions, the landlord is not trespassing since the tenant has given express consent to enter under the circumstances stated in the lease.
Trespass can be charged as both a civil and criminal offense.