There are two main types of phone security lock code, and it is not possible to hack either without a very in depth knowledge of the hardware and operating system you are dealing with.
The first is the PIN code, or Personal Identification Number. This is a code usually set by the owner of the phone to prevent unauthorised persons from being able access their information or use their handset - something which has the potential to create huge costs and a massive financial issue for a person who uses their phone on a post-pay or monthly contract basis. The pin code is used to lock the SIM card more than it is to lock the phone, and in most basic handsets it only needs to be entered once - when the phone is powered on. In more recent or advanced mobile phones, however, a personal lock code can be set for every time the screen switches off or the handset is locked. In most instances, the only way to circumvent a PIN code is to remove the SIM card and use another. Note that entering an incorrect pin code three times will require the user to enter a PUK code - which is only obtainable from the network - and that entering this code incorrectly ten times will permanently block the SIM.
The second code is the network restriction code. This code prevents the use of SIM cards belonging to networks other than the one to which the handset is locked. Many pre-paid handsets are locked to a network and sold at a subsidised cost by that network, with the idea that they will make back their money from top-up in the long run. These codes can be obtained from the network, and usually take up to 28 days to be delivered to the user. Some independent phone vendors provide an unlocking service which usually requires an algorithm based piece of software or a specific hardware connector used to reverse engineer the phone's restriction code, but these practises may invalidate your warranty.
The first is the PIN code, or Personal Identification Number. This is a code usually set by the owner of the phone to prevent unauthorised persons from being able access their information or use their handset - something which has the potential to create huge costs and a massive financial issue for a person who uses their phone on a post-pay or monthly contract basis. The pin code is used to lock the SIM card more than it is to lock the phone, and in most basic handsets it only needs to be entered once - when the phone is powered on. In more recent or advanced mobile phones, however, a personal lock code can be set for every time the screen switches off or the handset is locked. In most instances, the only way to circumvent a PIN code is to remove the SIM card and use another. Note that entering an incorrect pin code three times will require the user to enter a PUK code - which is only obtainable from the network - and that entering this code incorrectly ten times will permanently block the SIM.
The second code is the network restriction code. This code prevents the use of SIM cards belonging to networks other than the one to which the handset is locked. Many pre-paid handsets are locked to a network and sold at a subsidised cost by that network, with the idea that they will make back their money from top-up in the long run. These codes can be obtained from the network, and usually take up to 28 days to be delivered to the user. Some independent phone vendors provide an unlocking service which usually requires an algorithm based piece of software or a specific hardware connector used to reverse engineer the phone's restriction code, but these practises may invalidate your warranty.