Actually, this is a topic I am quite versed on. So maby I can shed some light...
Correct, a "Locked" phone can ONLY be used by the carrier that issued the phone. For instance Cingular cells you a Motorola Razor, it will work fine on their network, but can not be used by another. Cingular gives you a great deal on the price of the phone, and locks it basically to retain your business.
I currently have a Motorola Razr phone. There are locked Razr's right now available from Sprint, Verizon and Cingular. You can also purchase a Razr that has been unlocked. This is 100% legal. I saw an unlocked Razr at the mall the other day for around $300.00. With no carrier, contracts ect, an unlocked phone is sold at it's value with no discounts, and thus more expensive for the same phone.
On the other hand, with the right software, and expertise, the phone's can be unlocked. Just google "unlock [Model number/brand] cellphone" for instance. Your carrier will even do this on some occasions such as if you are moving , or your contract has been fulfilled ect.
As for the Sim card, they are not available in all phones, even some of the new ones, but it is a very popular feature. That card basically carries the information about your phone number, and your carrier network. Each sim card has a "serial number" assigned to it that can not be altered, plus your telephone number programmed by your carrier. When the phone contacts your carrier, this information is check to see if it is valid, to allow you onto the network.
I actually have 4 cell phone's lieing around here. As I am a gadget junkie, I like to "keep up to date" with phones, and try to get the latest and greatest ect...
The Razr, a Motorola MPX-220 smartphone, a Audiovox smartphone, and a Samsung flip phone. I can put my sim card into any of those phones power it on and use it. All of these phones were purchased through my carrier, Cingular. What I can not do, is put the sim card into a friends phone, on a different wireless carrier and use it, UNLESS that phone is unlocked.
When I purchased my Razr, I wanted to xfer information from my last phone to this one. Without a sim card, most phones wll not allow you to do ANYTHING with the phone, except dial 911. I explained I wanted to xfer the information via bluetooth, and how my old phone would not let me into the phone book, if I had my only sim card in my new phone. The tech went into the back room, and brought me a "blank" sim card, that would allow me to do everything with the phone, except dial out of course.