I recently bought an iPhone 6 from Apple to use abroad. I was pretty sure that it was already unlocked, but decided to ask AT&T just to be sure. The rep told me that he couldn't check this (something I don't believe) but said that I could apply to have it unlocked, which I did during the same chat. I got an email with instructions in a day or so, which said to back up and restore the iPhone. (You have to erase the iPhone before restoring from backup - that's the only way you'll see the congratulations message in iTunes.) Alternatively, if you have a functional SIM from another carrier, you can insert it and see if your iPhone detects that network. If it does, the phone is unlocked.