The folder you place the software in on your server will be a static constant in your URL, meaning if you install at site.com/gallery, it will always be site.com/gallery/(whatever application/page you're accessing and gallery would be duplicated in the URL if it is not the default application). Our software rewrites URLs to be more human friendly (if you enable that) to accomplish what @Meddysong is talking about so that if you install in a folder called gallery and run gallery as your default application but also have forums installed, you would see it at site.com/gallery/forums (or vice versa if you install in a folder called forums).
If you do not have a website at the root of your domain (e.g. site.com), nor do you plan to have one, it would be suggested to install there for URLs that make the most sense.
Example: our community here is installed at the root of our domain (https://invisioncommunity.com/) and we have set our CMS application (Pages) as the default application to generate content for our marketing website so that everything in that application can be set to the root. The software then puts the forums application at https://invisioncommunity.com/forums . If we had Gallery installed here it would then be at https://invisioncommunity.com/gallery .
Now, if you want forums as the default application, this would be it at the root of your domain (site.com) and then gallery would be at site.com/gallery or vice versa.
Hope that makes sense.