Jailbreaking, is the process of removing the limitations imposed by Apple on devices running the operating system through use of custom kerneks.Jailbreaking allows users to gain full access (or root access) to the operating system, allowing iOS users to download additional applications, extensions, and themes that are unavailable through the official Apple App Store, via installers such as Cydia. A jailbroken iPhone can still use the App Store, iTunes, and other normal functions, such as making telephone calls. Unlike rooting an Android device, jailbreaking is necessary if the user intends to run software not authorized by Apple.
There are programs on the web that will do this for you, just google "unlock iPhone (your iPhone model)" and you will find software programs that will do this for you. NOTE: If your contract is not currently up and your iPhone still has service, DO NOT ATTEMPT! Apple does sell factory unlocked iPhones, but they are insanely expensive.