Freeze code info

Sorry for asking a stupid question. But i m sure many others also might want to know,

What is defreeze/unfreeze code??
To make my situation more clear, an Samsung optus Australia locked phone, brought brand new and used only on optus network, needs to b unlocked for other carrier. Have never entered any Unlock code. Now do i need defreeze code for it? or only nck?? Unfreeze, as i believe will occur if i input wrong nck codes. Can someone show some light??