If i buy an iphone from someone how do i get to work on my carrier?

Do I go in to activate it even if I'm under contract, will they still activate it for me?

That is completely dependent on your contract whether or not they will activate it for you. When you buy an iPhone, be very careful to get one that will work with your carrier, because most of the iPhones unless you illegally modify them, they only work on one carrier, whatever it may be.

If it is a CDMA phone you have to use the carrier the phone is for… If it is a GSM phone then you can bring it to tmobile and they will unlock it for you to use on their network… But know that you will only get 2g speeds with it…