For use on another carrier? Two choices:
--Call the carrier the BB is locked to, and ask them to unlock it for you. Usually this is possible if you have service with that carrier and in good standing for the past 90 days.
--Purchase the unlock code from a vendor, one of which is gsmphonesource.com. They are reputable, I used them last week to unlock a phone.