If the police knock on the door and ask to come inside, many people feel obligated to let them in. They feel like the police are authority figures and have the power in such a situation.
While it's wise to be kind and respectful, know that the police don't have any power to enter your house in most situations, unless they have a warrant. Even if they think you've broken the law -- giving them probable cause -- they can't come in. That probable cause just gives them the ability to ask a judge for a warrant. They can then come back with the warrant and you can't deny them entry.
Getting a warrant takes time. Police will often knock first and ask to come in, simply hoping that you don't know your rights or that you're too nervous to say no. If you tell them they can enter, the search is now legal, at least for items that are in plain sight. For example, if they think you've been buying drugs and there are drug-related items on the coffee table in the living room, they can take them and perhaps arrest you if you let them into the residence, warrant or not.
Don't let the police bully you. Though there are limited exceptions, they need a warrant in the vast majority of cases. No matter how much they pester you from the other side of the door, you can refuse them entry and politely ask them to go get a warrant and come back. They'll eventually do it to avoid violating your rights.
If your rights are violated in a search without a warrant, make sure you know what legal options that gives you. Evidence gathered this way can often be thrown out of court.
Source: Flex Your Rights, "Police at my door: what should I do?," accessed Nov. 15, 2016