"You have the right to remain silent. Anything you say can and will be used against you in a court of law. You have the right to an attorney. If you cannot afford an attorney, one will be provided for you. Do you understand the rights I have just read to you? With these rights in mind, do you wish to speak to me?”
The Miranda Warning was a product of Miranda v. Arizona where a rapist didn't know his rights, and it went all the way up to the supreme court. Miranda, the perpetrator in question, won the case, he went free and it changed the way that police departments across the country went about arrests since. Above are those rights, or something very similar law enforcement officers are REQUIRED to read you when you are being arrested.
Make sure to know your rights.