Usually when you first get the cops called on you for trespassing you'll be warned to not come back and then if you do come back and trespass again then you'll be either fined or arrested.
It usually takes 2 times of trespassing for you to get arrested.
But it can depend on the cop as well and they may just arrest you on the first offense of trespassing and you could serve 30 days in jail and get a fine of up to $1,000.00 depending on the states laws.
But yes you can go to jail for trespassing especially if you return to the property again after being advised of criminal trespass by the cop.