Miranda Rights come into play when you are in custody and being interrogated. If you are pulled over for a DUI, and the officer is doing pre-field sobriety test questions, meaning they are asking you questions on the side of the road but you haven’t been placed under arrest, they are conducting an investigation and they don’t have to read you your Miranda Rights. Miranda applies when you are actually in custody and being interrogated—handcuffs have been placed on you, you’re in the backseat of a police car, you’re sitting in an interrogation room, and so on. If the officer starts questioning you about the incident, he needs to give you the Miranda warnings first. You would have to give an explicit waiver of those rights before you answer any questions, and before they can interrogate you.
If you have not been placed under arrest and you are not in custody Miranda is not required. If you have been arrested and you have been transported but no interrogation takes place then there’s no reason to give you Miranda warnings because you aren’t being questioned. If an officer wants to question while in custody then Miranda is required.