It's a way to lock your sim card, which contains all the information for your number and your network, along with your contacts if you put them on your sim card.
It depends. If you never changed it, it should be the last 4 digitis of the phone number. If you changed it then it would be whatever that is. If you don't remember that there is no way to recover it. If it is for a phone with a sim your carrier should be able to help only if your the account holder and go to a repair center so they can check your id. I work for sprint so if it another carrier I could be wrong.