newgrp changes the current real group ID to the named group, or to the default group listed in /etc/passwd if no group name is given. The user will be prompted for a password if she do not have a password and the group does, or if the user is not listed as a member and the group has a password. The user will be denied access if the group password is empty and the user is not listed as a member.
The sg command works similar to newgrp but accepts a command. The command will be executed with the Bourne shell. With most shells you may run sg from, you need to enclose multi-word commands in quotes. Another difference between newgrp and sg is that some shells treat newgrp specially, replacing themselves with a new instance of a shell that newgrp creates. This doesn't happen with sg, so upon exit from a sg command you are returned to your previous group ID.