Will an iphone work if I change the sim card?

My friend is willing to give me her Iphone 4s but her family didn't pay the bills on it so i doesn't really work for her. But if I put my sim card into it will it work for me, if I use my own plan? She sais it won't because the phone doesn't work for her. But i think its only because of the whole bill thing? Will it work with my sim card?

Added (1). It a rogers phone and i'm with bell, but I was thinking that I can get it unlocked?

Why don't you try it and see?

It depend on the network, off the phone and the sim.
e.g if its a orange phone and a o2 sim it will not work but if both are the same it should.

It should. But here's the thing, if it does then the first time you use it you will get hit with a data plan that supports the iphone. You'll get whatever they assign as a default plan which may not be the best one for you. So what I would do is take your existing phone and the iphone from your friend and head to the local store who's network you belong to. Show them what you have and discuss the best data plan option for you.