Trespass to Property Act
The Trespass to Property Act sets out the rights of an occupier of property to exclude others from it. The Act states that any person who is not acting under a right or authority granted by law and who without the express permission of the occupier enters a premises when entry is prohibited or engages in an activity on the premises when the activity is prohibited, or who does not leave the premises immediately after he or she is directed to do so by the occupier of the premises is guilty of an offence and on conviction is liable to a fine of up to $2000. To prohibit entry an occupier can post a notice (there are certain requirements in the Act in sections 5 and 7), erect a fence or even cultivate a garden in a certain manner (see section 3). The Act also authorizes an occupier to use reasonable force to arrest a trespasser (section 9).
Link: Trespass to Property Act (www.e-laws.gov.on.ca)