The purpose of the Miranda Warning is to make sure any information you give the police is given voluntarily, and not because you are being threatened or somehow forced to talk.
If you are placed in police custody, you are not legally required to answer any questions without your lawyer in the room.
If you are arrested, the police are required to read you the Miranda Warning before they ask you any questions about an alleged crime. After you have been "read your rights" you can decline to answer any questions until you have a lawyer with you. The Miranda Warning goes something like this:
"You have the right to remain silent. Anything you say can be used against you in a court of law. You have the right to an attorney. If you can't afford an attorney, one will be provided for you. Do you understand these rights?"
The police do not have to read you your Miranda rights just because they arrest you. If they don't want to ask you any questions, the police are not required to read you your rights.
The police are allowed to ask you for basic information like your name, birthday, and address without reading you the Miranda warning. Be warned, though, that if the police question you without reading you the Miranda warning, and you answer the questions, it is still possible that your statements could be used against you if you take the stand in your own defense.
Even after you have been Mirandized, it is legal for the police to continue questioning you without an attorney. It is up to you to exercise your right to silence by not answering any questions.