There are multiple types of Criminal Trespass in the Third Degree (NY Penal Law §140.10). However, the most common is knowingly and unlawfully entering a building (though not a home) or real property that is fenced or otherwise enclosed.
Criminal Trespass in the Third Degree is a class B misdemeanor. You face up to 90 days in jail, 1-year probation, a $500 fine and court fees, as well as possibly an order of protection and community service.
Burglary in the Third Degree is similar. (NY Penal Law §140.20). This crime involves knowingly and unlawfully entering a building (again, not a home), with the intent to commit any crime.
Unlike the low-level misdemeanor of Criminal Trespass in the Third Degree, Burglary in the Third Degree is a class D felony. You face up to 7 years in state prison, up to 5 years’ probation, up to a $5,000 fine and court fees, as well as possibly an order of protection and community service.