Unlocking the phone is not illegal; the service providers would have you believe that but taint so.
Some phones notably, Nokia, can be unlocked with input codes while others require the use of a data cable.
Check out the the phone forums and ebay and you can generally find someone who offers an unlock service- the cost should be $15-20.
Karl