For those who are new to ios develop fields, test app on real device is an exciting thing, but the fact is, test on real device is not easy task that you can work out in 5 minutes. So, just be a little bit patients to follow the steps, you will try it out at the end.
Step 1: Apply your apple developer 99$ account -> http://developer.apple.com
Step 2: After your apple developer account has been activated, you need to install your development certificate and installing provision file which contains your device udid.
All these steps is done in iOS Provisioning Portal page on your developer page.
And Apple has just prepared the great tutorials for these steps(at the right of iOS Provisioning Portal page)
Step 4: After you have successfully installed development certificate and provision file on your mac, it’s time to use code sign to test your app on your iphone/ipad. In XCode, building setting, you will see the code sign option:
Click run, now wonder happens, you app are running on your iphone/ipad! Enjoy
Here is some great tutorials for your reference: