As far as the shell is concerned,
su is a command like any other. When you run
su with no argument, it prompt for the root password, then invokes an interactive shell, as usual. Once this interactive shell exits, the script proceeds to the next command.
To pass commands to
su without too many quoting headaches, the easy way is to pass a script on its standard input using a here document. Use a literal heredoc (where the end-of-input marker is quoted) to avoid quoting headaches. Note that shell variables of the parent script are not available to the script that is executed as root: only environment variables (exported) are available. Example:
export ADD_USER ADD_TO_GROUP
adduser "$ADD_USER" "$ADD_TO_GROUP"
# more commands executed as the original user