coming from a skating and then bmx background, I have had my fair share of run-ins and run aways from the cops.
Bike related, there was a pakring garage in downtown York, that had 2 underground level, hence protected from wind and such, making it the perfect winter skating and riding location when there was snow on the ground or really cold.
When street riding one night, we were on the sidewalk and a cop on foot stopped us and told us to not ride on the sidewalk. So like any normal rider, me walk to the first corner and then got back on the bikes. So after riding around a bit we rode into the parking garage and met some of our flatlanding friends in there. About 10 min later, the cop comes walking down the ramp and grabs my friend and pushes him against the wall. I was a half level down and could have easily sprinted out but didn't want to get our friends in trouble since there cars were in there. So they got me too and so other kid and the cop told the two guys that were already down there to leave before he changed his mind. The cop said he saw us ride on the sidewalk to get into the garage. So the cop cuffed us, brought us to street level, sat us down and questioned us for 20 min, put us in the paddywagon for another 20 and then gave us a ticket and let us go. The one kid was a minor, so he got taken down to the station.
It was a 3rd degree misdemeanor or maybe a summary offense and when it was all said and done I only paid $55 bucks! I laughed when I paid the billed and said to myself, I will be riding on the sidewalk in 10 min! My friend was not so lucky since he didnt have a job and he got 40 hours community service and a $300 fine. Dumb-ass.
To sum this up: If you are street, flee because the likelyhood of getting caught is slim. If you are riding trails where you shouldn't, then stop. (or at least don't tell anyone and don't get caught).