It depends. Issuing a Miranda warning (often referred to as Miranda rights) is required when a person has been arrested and the police are planning on interrogating them about a crime.
Anything a person who is not under arrest says to the police, or any statement, such as a confession to a crime, made voluntarily to the police and not during an interrogation, can often be used during a trial, even if the Miranda warning was not issued.
Because Miranda applies only to interrogations done while a person is in police custody, it does not protect people being detained from standard booking questions such as name and address.
The Miranda Warning
The following is the common Miranda warning used by most law enforcement agencies in the United States today:
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 speak to an attorney and to have an attorney present during any questioning. If you cannot afford a lawyer, one will be provided for you at government expense.
A murder takes place and when the police question neighbors of the victim, several suggest that the police should talk to Jay Johnson, because he was a friend of the victim.
When the police go to Johnson's home to ask him about the victim he breaks down and confesses to the murder.
Because Johnson was not under arrest for the crime and because he was not being interrogated while in police custody, his confession would likely be used against him in court, even though the police did not issue the Miranda warning.
Johnson is placed under arrest for the murder of his neighbor and the police read him the Miranda warming. During a taped interrogation he tells the police he wants a lawyer, but continues to give the police details about the crime.
During the interview he asks four more times for a lawyer, but the police keep questioning him and continues to provide them with answers that are self incriminating.
It is likely that a judge would refuse to allow any statements he made during the interrogation as evidence because the police failed to stop the interview when Johnson asked for a lawyer.