You are arrested when you are taken into custody or when your freedom is restricted by a police officer. Sometimes arrest involves a search of your person or a "pat down" and handcuffing. Many times you will simply be instructed to accompany an officer to the police station.
If you are ever in doubt as to whether you are under arrest or not, it usually doesn´t hurt to ask. If you are not under arrest, you should be free to leave. If the officer will not let you leave, then you are under arrest. Once you are under arrest, your Miranda Rights are in effect.