I run into folk all the time with this question. It's usually locked to the carrier and only they will release it. Sometimes you have to pay off their bill or such.

Here it's often cheaper to buy the unlocked phone, even if used.

That's the safe way. There are too many rip offs out there.