If you plan to develop an iPhone or iPad app, you will first need to register your device ID to the Apple Developer Portal. Sadly, this process isn't as simple as it looks so here are four different ways to get your UUID.
Here's an example of where you will need to input your device ID also known as your Universal Unique Identifier.
Option 1 - iTunes
If you prefer GUI interfaces, iTunes will do the trick. Simply plug in your phone and go to "Summary". This isn't obvious at all but if you tap the invisible field (look at the red box) you will switch between different serial numbers. You will find one titled "UUID".
Option 2 - Homebrew
I'm not a fan of iTunes so here's an approach using a Homebrew plugin. If you're not familiar with Homebrew, read this article.
Option 3 - Command-line Only
If you're not a homebrew user, here's a single command.
Option 4 - Use a website or app
WARNING
I wish there was an app made by Mozilla, EFF, Apache, or some other foundation that I could reliably trust will treat my information as ephemeral data not store it somewhere or place it at risk. Unfortunately, I cannot. Therefore, if you choose to use something like What's My UDID you're using it at your own risk.