Whether you purchased your iPhone in the store or ordered it online, you still need to connect it to iTunes to get it up and running.
Doing so allows you to transfer information and data (including your music collection and more) to your new iPhone. And, if your new iPhone is replacing an old one, you can transfer all of the data (including music, photos, contacts, and apps) from your old iPhone to your new one.
You need iTunes installed on your computer before you begin. If you already have iTunes installed, you should make sure you have the most recent version. To check, open iTunes and then go to the "Help" menu. From there, select "Check for updates."
Once you've verified that you have the most recent version of iTunes running, you should connect your iPhone to your computer using its included USB cord. You'll see mobile device drivers install automatically, and then iTunes will launch automatically (if you don't already have it open).
If you're connecting a new iPhone, you'll see a message that says "Let's Get Started." The instructions tell you to register your phone and set up your iTunes account.