Will buying an iphone in contract and unlocking cause contract immediate fee?

If i buy a iphone for example on att contract and unlock it, will att charge me what's left on the contract or will i just go by like nothing happened and free of contract?

I haven't seen this but it makes quite a bit of sense for companies… Not sure if they do however.

I don't think i understand but are you saying if you sign a 2 year contract to get the phone cheaper then unlock it why? To go to another phone company you will still owe for the 2 year contract beside why a i phone recent survey says 85% of the worlds smart phones are samsung plus unlocked phones never function right no matter what kind they are