for three years - either hire an attorney to fight it for you (it will probably cost you $500) or try to figure it out yourself.
Your ticket should tell you when you are required to appear - show up, plead not guilty and ask for a pretrial - meet with prosecutor at pretrial, explain yourself (using other friends as support), that you have a clean record, give other pertinent facts about yourself e.g. employed, going to school, accomplishments.
The prosecutor will likely give you an agreement to resolve the matter and it will cost you anywhere from the cost of the trespassing fine to $150 - part of the agreement is that you keep your nose clean for 3-6 months then the charges/citation get dropped and it never shows up on your record.
this is a quick explanation from my experience - if you don't want to do all of this (I'm sure I've left a few things out) then hire an attorney.