goto is used to make the code go to what ever the label following it is. This can be a label that comes before or after the goto command. You use it to jump to different places in the script.
gain is used to remember commands. This allows you to remember things that happened in the past.
if is used to recall a certain gain. If the reader has that gain, then whatever is listed in the if statement will play. If the reader does not have the gain, the code will skip over it.
else goes along with if. Else basically says if none of the previous requirements have been met in the if statement, then the code below else will play through.
I am not sure what you mean by locker. Do you mean locking a choice?