I've unlocked several Motorola phones through T-Mobile. The code is unique to your phone. The usual process is to put in a request and then your provider will request the code through Motorola. It can take about 2 weeks. As far as I know, it's much more difficult to get unlock codes through other providers.
Some Nokia phones can be unlocked easier.
EDIT: Is it possibly asking for your SIM unlock code? If so, that is probably a 4-digit code and should be in your documentation. Often they are 0000 or 1234 (if they haven't been changed by the owner). You do not want to enter a wrong code repeatedly in some phones.