PUK stands for Pin Unlocked Key, and is required when you enter the PIN code for your phone wrong 3 times.
The first thing I'd try if you need a PUK code is to dig out the original packaging you got with the SIM card or phone, as the PUK is often listed here, along with the phone and SIM card number.
If it is not there (or you can't find the original paperwork that came with your phone), then try logging into your online account with your network provider (eg. T-Mobile, Vodafone etc), and you may be able to get it from there, via your account details.
If all else fails, you will have to call up your network and they will be able to issue it to you over the phone. Remember- they will only issue a PUK code to the account holder, so if the phone is registered in someone else's name, you will have to get them to call.
They will also ask you a series of security questions to make sure you are who you say you are.