Can the police search you, your car, or your premises? It depends.
One thing it depends on is if you consent. The US Supreme Court has instructed us that a consentual search is always legal. So lesson number one, if the police ask to search you, under no circumstances should you say yes.
Another thing it depends on is if they have probable cause to arrest you. If they do, then a search is allowed as being incident to arrest. Whatever they find can be used against you.
They can also search you or a premises or vehicle under your control if they have a warrant. The warrant still requires probable cause and is supposed to be fairly specific about what is being searched and what is being looked for.
What about your car? They can search your car whenever you get stopped, this can include a drug dog sniffing if the dog is pretty near by (a dog sniff doesn't count as a search, btw). But they can't search closed interior compartments without a warrant, unless they go ahead and arrest you and impound your car, then they can "inventory" the contents of the car and whatever they find can be used against you.
All these situations have very specific rules that apply to you, but the chief reason a search is conducted is that consent was given to the search. The cop says, "Can I search your vehicle?" and somebody in the situation says "yeah". Don't do this.
If you have been searched either before or after an arrest you need legal counsel. Call good counsel today. (405)601-9393. The OKC Criminal Defense Team is waiting for you. Service State Wide.