The installer asks you when you run it (and sets a default, although that varies by operating system so I can't tell you what you have)
If your JIRA is running you can visit "system information" and you'll find it in there.
You can also look at the processes running on your server and they'll show you the install directory (On a unix type box for example, "ps -ef | grep -i jira" will tell you)
You can't "set" this directory at any time other than installation. If you want to move a JIRA, you will end up manually editing some of the config files that the installer normally creates for you. (This isn't too painful - basically look in <jira install>/conf and <jira install>/bin for any file with the installation directory in it)