Even without any reason to suspect that you've done anything wrong, a police officer can approach you to ask questions and ask (for consent) to search you or your objects (such as a purse or briefcase). As long as the officer doesn't suggest that you are legally compelled to talk or agree to a search, the officer has done nothing wrong. (United States v. Drayton, 536 U.S. 194 (2002).) At the same time, you generally aren't required to answer a police officer's questions or allow an officer to search your person or your belongings.
(This article discusses general constitutional principles; make sure to check out our note on the importance of state law.)
Unless a police officer has probable cause to make an arrest, reasonable suspicion to conduct a stop and frisk, or a warrant, a person generally has the legal right to walk away from the officer. However, at the time of the encounter, there's often no real way to know what information the officer is relying on. An officer might have information that provides a valid legal basis to make an arrest or to conduct a stop and frisk or stop and identify, even if the person stopped is actually innocent of any wrongdoing. So, an officer might be justified in forcibly detaining an innocent person who starts to leave the scene of an interview.
Common sense and self-protection suggest that people who intend to walk away from police should first make sure that the officer does not intend to arrest or detain them. One might say, "Officer, I'd prefer not to talk to you right now. May I leave?" If the officer replies that you are not free to leave, you should remain at the scene and leave the issue of whether the officer had the necessary legal basis to detain you for the courts to determine at a later time.
(For more information on speaking to the police, including what can happen if you say nothing, see Invoking Your Right to Remain Silent.)
Not necessarily. A Miranda warning is required only if a suspect is in custody and the police interrogate the suspect. In other words, both "custody" and "interrogation" have to occur for Miranda rights to kick in. One upshot of this requirement is that a statement by a person who is not in custody, or a statement by someone who is in custody that's volunteered rather than made in response to police interrogation, is likely admissible in evidence even if no Miranda warning was given. On the flip side, many people mistakenly believe that whatever they say to an officer can't be used against them without a Miranda warning, which is not always the case.
People can sometimes clear their names as well as help the police find the real perpetrators of a crime by answering a few straightforward questions. For example, perhaps a possible suspect can show unequivocally that he was at dinner with a friend at the moment a crime was committed. On the other hand, many criminal defense attorneys would say that suspects should almost never talk to the police without consulting counsel first. (For some of the potential downside of talking, see this article on speaking to the police.)
People can sometimes make life easier for themselves by cooperating with police officers—as long as they don't have a good reason not to. "Contempt of cop" has resulted in the arrest and even physical injury of more than one innocent person. When innocent people who are pulled over or questioned by police officers stand on their rights too forcefully, events can sometimes get out of control rather quickly.
If the police want to talk to you and you have the chance, consider consulting an experienced criminal defense attorney. A knowledgeable attorney can not only advise you on how to handle police questions but also explain the ins and outs of the applicable law in your jurisdiction. For instance, a lawyer can explain to you the potential consequences—both legal and practical—of lying to or not cooperating with the police.