If you ask the old phone company to unlock the phone for you (they just give you a code), they may charge you up to $75 dollars!
If your phone is not rooted, you can find a way to root it by Google. I followed the following steps to installed lasted 2.3.6 Value Package for my Galaxy S(i9000m from Bell & Virgin Mobile Canada) and unroot the phone.
First try the first step (See Sim Unlock Code). If you are lucky to get your unlock code, the rest is simple, just replace with the new SIM card and restart your phone, the phone will prompt you to input the code.
If you are not lucky and there is no unlock code returned, don't panic, you can continue with Step 1& 2. This happens to me. For some reason, this step does not give me any unlock code for my Galaxy S
Step 1 (Save actual Efs Folder) just back you files.
Step 2 will unlock the phone directly (no need to input the unlock code). Then the phone will automatically restart.
After restart, your phone should be unlocked. Plug-in other phone company's SIM card and make a phone call to see if it works.