The United States Constitution affords a number of protections including the protection against unreasonable searches and seizures found within the 4th amendment. The United States Supreme Court has had to interpret and define the extent of that protection over the years. In 1968, the Supreme Court decided Terry v. Ohio, which essentially established that, although the right against unreasonable searches and seizures exists, law enforcement officers may detain and "frisk" a person for weapons under certain circumstances. This type of search became known as a "Terry search."
In most cases, a law enforcement officer in the United States must have probable cause in order to conduct any type of search of a person or the person's property. The U.S. Supreme Court has carved out exceptions to that general rule over the years for a variety of reasons. What became known as the Terry search exception was the result of a case where the defendant was spotted on a street corner acting suspiciously by a Cleveland police officer. When the police officer approached the defendant and asked his name, the defendant was somewhat unresponsive, at which point the police officer took ahold of the defendant and conducted a pat down search of his outer clothing, revealing the outline of a pistol. The defendant, Terry, appealed his conviction on the basis that the search was unconstitutional.
The case eventually reached the U.S. Supreme Court, where the justices upheld the conviction and concluding that a law enforcement officer was allowed to conduct a brief "pat-down" search — which later become the Terry search — of a suspect's outer clothing if the officer has reasonable suspicion that the person has committed a crime or is about to commit a crime. The rationale for the search is to allow law enforcement officers to check for weapons in the interest of officer safety. For a Terry search to be legal, an officer must have a reason for thinking the suspect may be armed, as opposed to simply a hunch or a feeling.
One of the big issues in Terry v. Ohio was whether or not the search even fell within the purview of a "search and seizure," as the defendant was not under arrest at the time. The court concluded that there are encounters with law enforcement that fall short of an actual arrest that are also considered a "seizure" under the 4th amendment and, therefore, are protected under the Constitution. If a law enforcement officer does find a weapon during a Terry search, he or she then has probable cause to arrest the defendant.