In some cases, trespassing may be a civil offense, while in other cases it may be a criminal offense. The penalties for trespassing can also vary depending on the jurisdiction. In some cases, trespassers may be subject to fines or imprisonment. In other cases, they may simply be ordered to leave the property.
In addition to the general laws against trespassing, there are also a number of specific laws that prohibit trespassing on certain types of property. For example, there are laws that prohibit trespassing on school property, government property, and private property that is posted with "no trespassing" signs.
If you are caught trespassing, it is important to cooperate with law enforcement. You should not resist arrest or attempt to flee. You should also be prepared to provide your name, address, and contact information.
If you are charged with trespassing, you should contact a criminal defense attorney. An attorney can help you understand your rights and options, and can represent you in court.