You are hanging out in a park with a couple of friends. Two police officers show up and ask you and your friends what you are doing in the park. You walk away, which is within your rights. If you do attempt to walk away and the officers prevent you from doing so, you are legally detained. Or you don’t walk away because you believe you are not free to walk away due to an articulable intimidating presence of the officers. In either case, you are being detained.
You may ask the officers: “Am I being detained?” and, indeed, you should. It is important to establish whether you are detained on not. (If the officer says you are not being detained, then you are free to walk away.) The reason it is important to establish whether you are detained or not is because of what may come next. If you end up getting arrested subsequent to the detention, you may be able to suppress the evidence if the court determines that the detention was unlawful.
You find out from the officers that they received a report of suspicious activity in the park and that you and your friends fit the description of the individuals who are suspicious. In this case, or under other circumstances where an officer can establish reasonable suspicion that you are engaged in or about to engage in criminal activity, the officer can legally detain you for a brief investigation. This is known as a Terry stop, named after the Supreme Court case, Terry v. Ohio (1968) 392 U.S. 1., where that court held that an officer may conduct a brief investigative detention when there is reasonable suspicion that the individual stopped is armed or where the officer suspects criminal activity is afoot.