The method of unlocking depends on the device you have. Generally speaking, an interposer will work such as the Gevey/R-Sim/X-SIM (all of which are just generic names slapped over a generic chip) that you can purchase online. Insert it between your SIM tray and your actual SIM card, and follow the instructions that accompany the product. Or, depending on which carrier you have and other pre-requisites, you may be eligible to request a free or low cost unlocking service from the original carrier of the device assuming you're the original owner.