A bit vague but....
If the phone your friend gave you is also a T-Mobile phone, simply take your SIM card out of your existing phone and insert it in the phone given to you. If it's a AT&T phone, you will need to get it unlock if not already done then you can put in your SIM card and go. If it's either Verizon, Sprint phone, sorry Charlie, it will not work with your service as the technology is completely different.