Each line is setting an alias. An alias is a piece of text, when typed at the prompt, or included in a script, that is expanded to something else. This is often done to save typing long commands.
alias lion 'large fierce carnivorous animal'
In your question, the first alias arranges that when the user types 'setptompt' this is expanded to 'set prompt="${cwd}% " ' This command makes the prompt equal to a dollar sign followed by the current working directory followed by a percent sign. The second alias ensures that when a user types cd this is expanded to 'chdir \!* && setprompt' This expands to 'chdir (change directory) to whatever directory is typed after cd and then run setprompt (which is expanded as above)'
THis looks like a normal part of an ordinary login script.