The Package in Detail

TYPO3 Folders and Files on root level

The following files and folders are part of the TYPO3 package in a composer based installation.

public/
is the document root and public entry point.
var/
contains system files, like caches, logs, sessions...
vendor/
the composer vendor directory contains third-party packages, libraries etc.

The 'public/' folder

The following files and folders will be created in the public folder during the installation of TYPO3:

fileadmin/
contains your site assets and files, local to the website. You can e.g. put images, user uploads and other assets here. By default this folder is used to store files, which have been uploaded in the TYPO3 Backend (fileadmin/ is configured as the first default storage). fileadmin/ must be writable for the web server user. Files in fileadmin/ are for editors, you should not put any site configuration files here. Exclude the fileadmin/ folder from your version control to make sure not to mix development files and user files.
typo3conf/
contains configuration and extensions for the local site.
typo3conf/ext/
will hold the local extensions available for this installation, extensions can be required via composer.
typo3conf/LocalConfiguration.php
is the main configuration file of your installation and the one the customized values of all the Install Tool options get written to. It has to be writable and will be updated automatically by the Maintenance Tools and the Extension Manager. You can edit this file manually, but make sure you keep the PHP syntax working.
typo3conf/PackageStates.php
contains information about the extensions, which are activated in your system.
typo3conf/AdditionalConfiguration.php
is an additional configuration file, which is executed on every request after the LocalConfiguration.php has been loaded. It can be used to manipulate the configuration of $GLOBALS['TYPO3_CONF_VARS']. This file is not created automatically; create it if you need it.
index.php
the main script for the website Frontend

The var/ folder

cache/
is where file based caches will be stored.
charset/
contains charset conversion tables.
labels/
contains language labels for a translated TYPO3 backend. You can download more languages via "Maintenance" > "Manage language labels"
lock/
is where file based locks are created.
log/
the default location for TYPO3 log files. Can be configured via the TYPO3 logging framework. See Logging Framework <https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Logging/Index.html>.
session/
is where sessions are stored.
transient/
acts as transient storage during file operations for example.

Custom folders?

Yes, just add whatever you like. Why not?