"Search" has a particular meaning in criminal law. Police officers a conduct a search within the meaning of the Fourth Amendment if they try to find evidence or information by:
A frisk qualifies as a Fourth-Amendment "search," but it's more limited than your typical hunt for evidence. It's a protective search for weapons.
Police officers are allowed to stop someone they reasonably suspect of criminal activity. They may follow up the stop with a frisk (or pat-down) if they have reason to suspect that the person is armed and dangerous. A frisk in this context is supposed to be a limited search of the person's outer clothing—for weapons.
An officer conducting a proper frisk who feels something that seems to be a weapon may reach into the suspect's clothing to seize it. An officer who feels something that is clearly contraband may seize that, too.
An all-out search, on the other hand, involves the officer probing for evidence. The officer isn't confined to screening for weapons.
Example: Officer Mace stops a man on the street who resembles a person wanted for bank robbery. Officer Mace frisks the man. He feels a soft packet in the man's back pocket. With the packet still in the man's pocket, Mace pokes a finger through the packaging into the packet, rubs powder from the packet onto his finger, removes his finger, and decides from the powder's appearance and smell that it is an illegal drug. Officer Mace removes the packet and arrests the man for possession of illegal drugs. The contents of the packet are not admissible in evidence. The officer probably had reasonable grounds for detaining and frisking the man (a potentially armed and dangerous suspect). But he didn't have probable cause for arrest or a full-blown search. Therefore, all Officer Mace could do was frisk the driver and seize either a weapon or contraband in plain feel. Because the soft packet could not reasonably have been mistaken for a weapon, and Officer Mace had to manipulate the packet before believing it contained illegal drugs, the frisk became an illegal search.
Example: Same case, except that Officer Mace, when frisking the man, felt, then seized, a packet of little pebbles that felt like rock cocaine. Under these circumstances, the rock cocaine is likely admissible in evidence. The officer could tell from a plain feel that the packet contained illegal drugs.
Whether an officer's probe is a mere frisk or a more invasive search depends on the facts of the case. Plus, the law can vary somewhat from one jurisdiction to another. If you have a case, make sure to consult an experienced criminal defense lawyer, who should be able to explain the applicable law and guard your rights.