If your phone was locked, you need to unlock it to switch to a new carrier. You do this by asking your old carrier for an unlock code. Afterwards, you activate it with the new carrier.