Mustn't police have a warrant before searching my home?
Generally yes, except when 1) a person voluntarily gives permission to enter and search; 2) the contraband or evidence is in plain view; 3) emergency situations when getting a valid search warrant could compromise public safety or could lead to a loss/destruction of evidence or the potential for a suspect to flee; 4) if you are being arrested in your house, the police can search for weapons or accomplices if they have a reasonable fear for their own safety or if evidence might be destroyed.
Sometimes, the answer is "yes, except…" and that's the case for this question. The police have to get a warrant except when they do not.
There are a number of different exceptions to the warrant requirement. Not enough to make the requirement for a warrant worthless as protection against the government, but enough to make it much less absolute.
The first exception is that no warrant is necessary when there is consent. That is, when someone with legal permission to be there, who is mentally and legal capable of giving consent (e.g., a non-mentally impaired at-least-18-years-old person) consents, or agrees to a search. This does not require your consent specifically. There are any number of others who can consent for you, like a spouse or live-in significant other, an adult child, a roommate or overnight guest, etc. If they may legally be in your home, they can let the police in.
The second exception is the "plain view" exception. If there is something obviously illegal (the stolen goods or firearm the police are search for; illegal drugs or drug paraphernalia; etc.) which can be seen from outside the home, if the police should see it, they can go in to recover it. So if, say, someone leaves glassine bags of heroin on their living room coffee table and the police can see that from the front door when they first knock on it and the homeowner opens it to talk to them, or if an assault weapon like the one the police are searching for can be seen sitting on the dining room table through the front window, the police can enter.
The third exception is "exigency," or when there are circumstances which require the police to enter to preserve evidence in imminent danger of destruction, or to safeguard life. For example,
--if they knock on the door and say "police," and suddenly hear running footsteps and the sounds of a toilet flushing, it's a reasonable supposition that the homeowner is trying to dispose of drugs. The police can legally enter to stop that.
--if an officer walking near your home hears gunshots or a blood-curdling shriek and kicks in the door to try and save lives, anything he finds then will be admissible as being the result of a legal search.
--if there is a "hot pursuit". If an officer sees a fleeing suspect run into a home, the officer can follow without a warrant, and anything the officer finds in the process of pursing the suspect will be admissible in court, as the result of a legal search.
The basic idea is: if an emergency justifies officers in being someplace, anything they see there is fair game.
A fourth exception is very similar to the exigency exception above. If an arrest is being conducted in your home, whether you or someone else, if circumstances suggest the possibility of danger to the officers, they can do a very basic search for accessible weapons or accomplices, to ensure their safety. Anything found during such a search is admissible.