Cell phone question

I have a nokia t-mobile phone…and my friend has a sprint phone…she wants to give me her old sprint phone. …is it possible to use it w/ t-mobile? what does unlocking a cell phone mean?