Dealing with the police can be intimidating. Understanding the reason the police want to talk to you can help matters to go smoothly.
If the police stop someone they are required to...
The police can stop someone walking down the street for different reasons, including just to chat or to investigate a crime.
The police may walk up to you just to engage you in conversation. You do not have to talk with the police if you do not want to. If you want to go on your way, ask if you are free to go. If the police say you cannot go, you are being detained or arrested - otherwise you can simply leave.
The police can detain you for a short period of time if they are investigating a recent or ongoing crime. They must have reasonable grounds to believe that you are connected to that crime.
You do not have to identify yourself just because the police stopped you. However, if the police think you have broken a law you should identify yourself. If you do not identify yourself in these cases the police can decide to arrest you to establish your identity. For example, they may need your name to give you a ticket for jaywalking.
The police can enter a residence if they...
If the police come into your house - and you do not think they have good reason to - do not try to stop them. You should tell them you do not agree to them coming in. Get their names and badge numbers. Write down what happened as soon as you can, in as much detail as you can. Then, if you want to make a complaint later, you will have the information you need.