This command is used by channel operators to find out what the channel key is. This is useful if the operator was not in the channel at a time when the channel key was changed. The new operator will then not know the key unless informed by another user, which is not recommended. Therefore, this command can be used to find out what the key is.
This command accepts 1 argument, the channel for which to get the key. If you wish to get the key for #channel, you would use this command:
/msg ChanServ getkey #channel