This is from apple. Maybe it is easier to understand
Follow these steps to test your application in the sandbox.
-
Log out from your iTunes account on the test device.
Before you can test your application, you must first log out of your regular iTunes account. To log out of your iTunes account, exit your application, launch the Settings application and click the Store icon. Sign out from the currently active account.
Important: Do not sign in with your test account in the Settings application.
-
Launch your application.
Once you have signed out of your account, exit Settings and launch your application. As you make purchases from your application’s store, Store Kit prompts you to authenticate the transaction. Log in using your test account to approve the payment. No financial transaction takes place, but transactions complete as if a payment was made.