You can call your service provider to get a SIM unlock code for your HTC phone. Alternatively, you can use an online service such as FreeUnlocks.com and CellUnlocker.net.
FreeUnlocks offers to unlock your phone free if you make your order by using Trialpay, a payment system similar to PayPal. Visit FreeUnlocks' website to enter your phone's make and model, order your unlock code and either make a payment by Paypal or get the service for free by using Trialpay. You then receive an e-mail containing your unlock code. The website contains step-by-step instructions.
CellUnlocker uses a similar approach to providing you with an unlock code. You pay for its service through Paypal at prices often lower than those charged by your service provider. Their website contains a video demonstrating the steps you need to take to unlock the phone. The site also provides a list of models that cannot be unlocked.
Both sites can unlock GSM type phones and both require you to submit your phone's IMEI which is located beneath the battery or by typing *#06# into your device. CellUnlocker is unable to unlock CDMA type mobile phones and FreeUnlocks says it has limited ability to deal with this carrier.