It is not a crime to refuse to answer questions but refusing can make police suspicious of you.
Police may “pat down” your clothing if they suspect a concealed weapon. Do not physically resist but make it clear that you do not consent to a search.
Ask if you are under arrest. If you are, you have a right to know why.
Do not bad mouth the police officer or run away even if you believe what is happening is unreasonable. That could lead to your arrest.