Gsms have imei #.
The provider wouldn't lock by it, but if stolen, they can request other providers not to allow access over several countries, using this phone.
When registering to a provider (turning on your phone), depending what has happened with this phone, they come and pick you up.
Gsm's is something you do not buy second hand, unless you know who it is from.
Likewise, people that like to stay anonymous change simultaneously sim and gsm every 2 weeks or so.
To find out your imei, type on your phone *#06# (even without sim card), and below the battery. They have to match !
Go on numberingplans.com where giving in an imei, will give you some info over the phone.(Not whether blocked or not)