SetChatColor is the name of the function for calling it later, the serverCmd prefix just means its a server side command (see: Iban's server/client tutorial), which basically means you can type /setchatcolor into the chat.
The variables in the brackets are place holders, which are filled when the function is called. For example: calling "function bobby(%arg1,%arg2,%arg3)" later with the line "bobby("this is an arg",500,$pi);" will recall the function that has been defined. It will set %arg1 to "this is an arg", %arg2 to 500, %arg3 to the value of the global variable $pi. It will then execute every line of code between the two curly braces ({}) and you can then use the place holders/arguements that now hold data. Now you just execute code that you want to do with the %arguements. (note that you don't have to have arguements in a function, that bit can be blank and you just call it later like "bobby();") You can do anything in functions except create new functions and packages (see: Iban's packages tutorial).