Police officers may have reason to believe, on occasion, sometimes for good reasons, that illegal activity or illicit drug use is taking place in a person's vehicle. Oftentimes, police will, therefore, search a person's vehicle, even without their permission. They often use what they find to work with local prosecutors in bringing allegations of drug crimes.
Police do have broader power to search a person's car without consent than they do, say, a person's private residence. In the case of the latter, police generally need a search warrant to enter someone's living space without their permission. Police may, but need not always, get a warrant when searching a car.
However, this does not mean that police have absolute power to search a person's car. First of all, they must pull a vehicle over or approach a car for a legitimate reason. They may not just pull over a car for the purpose of checking out what is in it.
Moreover, once a driver has been stopped, police need probable cause to believe that there is evidence of criminal activity, like illegal drugs, in the car. They may also be able to conduct a search if they make an arrest or if they have good reason to believe that they need to do a security sweep of the car.
The bottom line is that a person accused of drug possession or trafficking on account of something the police found in their car need not give up hope that their case is without a viable defense. Police have to follow the law and respect people's right to privacy when searching for vehicles. If they do not, the evidence they obtain may be disqualified from the courtroom.