The Fifth Amendment to the United States Constitution guarantees the right to be free from compelled self-incrimination. This means that the police can never legally force you to speak with them or to provide them a statement. You can voluntarily speak with the police if you choose, and sometimes it's in a person's best interest to speak with police. The law is clear, however: Your statement must be voluntary.
If the police arrest you, that does not mean you have to speak with them. Police officers must apprise you of your constructional right to remain silent if they seek to question you while in their custody. Your right to remain silent remains with you throughout the entire criminal justice process. You may waive this right if you wish, but it's advisable to first consult with an attorney.
If you wish to exercise your right to have an attorney present during questioning, you must ask for one. Police must stop the questioning until they provide you with an attorney, but they don't have get you a lawyer right away, nor will the state provide you with an attorney of your choice. If you can't afford an attorney, the court typically appoints one for you at your first appearance before a judge, usually within 48 hours of your arrest or 24 hours, if you're under the age of 17. These rules vary by state, however.
Police have inherent powers to maintain order and safety in the community, but this doesn't mean that citizens must give police witness statements or information under penalty of law. Police can make you obey such orders when related to their community caretaking function -- they can tell you to "stay in your house," "get out of your car," "put your hands up," or anything that relates to their function as police officers. Police can make you "do things" but not "say things," beyond basic biographical information, such as your name and date of birth. The U.S. Supreme Court had found that basic information isn't "testimonial," and won't violate your Fifth Amendment right to remain silent.
It's an act of good citizenship to provide police with information that will assist them in solving or preventing crime, and the entire community benefits from citizen-police cooperation. Citizens who might feel intimidated, however, can give anonymous statements to assist police. Most law enforcement agencies have anonymous toll-free tip numbers that don't require you to give any identifying information.