Unlocking a phone simply means to allow your device to be compatible with different SIM cards to enjoy services from different service providers, manufactures of many devices do not support these activity and often users are recommended against it, the procedure is also known as jail breaking a device and the steps on how to unlock iPhone 3gs with cydia involves using purplesnow which is an unauthorized application therefore one would need to jail break their device first after backing up their data so as not to loose it, then disable 3G go to settings, general then network and tap on enable 3G icon to set it off. Get back to the main screen when finished.
The cydia application should appear on the device screen since it has already been jail broken, launch the application and select manage icon at the bottom of the screen, tap sources, edit and add. Type in apt.geohot.com to add source when done exit out of the section. To install purpulesnow look for it using cydia’s utility search tap on the details once you have found it to install and confirm it, after successful installation exit from the application and reboot the device by pressing the power button until it goes off then turn it back on and the device will be unlocked and ready for use.