it is used to set the default permissions in your home folder (normally)
each distro may differ.
when you read it in /etc/profile you take the number away from 777 to work out your read write execute permissions for user, group, others
So what you should do is first work out what you want and here is a online calculator for us newbies
eg you want to read and write to a file in your home folder and hide it from everone else
rw becomes 600
now we have (777-600) = 177
so umask 177