He is the mechanism that digs up evidence suggesting guilt, and anything you say that makes his job easier will, by definition, make your life more difficult. If you aren't driving, you don't have to, but unless you're running from the law, there really isn't any reason not to. Ask the cop if you are under arrest, sweetly. If you aren't, you should be able to leave. If you are, they should be able to tell you why.
Cops have guns.
Don't physically resist anything they choose to do. And never, ever, ever run away from a police officer. He might shoot you. A cop is allowed to frisk you on the outside, but that's as intimate as he's allowed to get. As he's frisking you, tell him you don't agree to any search.