You typically start a session on the computer by logging in; the configuration of your account determines what happens then.
When you log in, the system creates a user session led by a process that runs under your user ID and default group ID, as determined from your account entry in /etc/passwd.
The user ID and group ID determine the permission the process has to access files and system resources. In addition, if the process creates any files and directories, they belong to that user and group. Each new process that you start inherits your user ID and group ID from its parent process. For more information about file permissions, see File ownership and permissions in Working with Files.
When you log in via the login utility, login changes directory to your HOME directory; it also sets LOGNAME to your user name and SHELL to the login shell named in your account. It then starts the login shell, which is typically a command interpreter (/bin/sh), but could also be an application that gets launched as soon as you log in.