When you fight the law, the law usually wins. Not only is running from the cops a bad idea, but it's also likely to get you in more trouble than you would be if you simply stuck around. In some jurisdictions, running could result in a resisting arrest or obstructing justice charge [source: Robinson].
The better course of action is to ask if you're being detained and simply walk away if the answer is "no." Even if you aren't doing anything wrong and think that the officer is exceeding his or her authority by stopping you for questioning, forcing you to empty your pockets or rifling around in your car, it's best to assert your objection and to calmly make clear that you don't consent to the officer's actions. Submit to a search or arrest, then challenge those actions in court if necessary [source: American Civil Liberties Union].