When you but a BlackBerry from, for example AT&T, you get it at a subsidized price. A $450 BlackBerry at retail may only cost you $200. AT&T "locks" the subsidized device to their own network so you can't use it on another GSM network like T-Mobile. Unlocking it removes this AT&T-only restriction.
If you're a customer in good standing for a minimum of 3 months the carrier will usually give you the unique unlock code for your device for free. Otherwise you have to buy the code from an unlocking service. Rogers, I believe, no longer gives the code for free. Almost all other carriers still do.
Like NJBlackBerry said, CDMA carriers like Sprint and Verizon don't lock their devices to their network at all. They simply refuse to allow a device they didn't sell themselves onto their network. A "gentleman's agreement" if you will between these carriers.
Bottom line: if it doesn't say "Sprint" on it, Sprint won't allow you to use it. Same for Verizon.