These aren't GATK specific switches, but a java JVM (java virtual machine) parameter. Since GATK4, these parameters have been absorbed into the main binary to integrate well with the WDL notation and Cromwell orchestration.
-Xmx is the switch to tell Java how much memory it's allowed to work with (heap size). This is akin to the amount of RAM on your machine. -Xmx8G means that you're telling Java it can work with 8GB of memory (or RAM) on your machine. It's important not to allocate more than your machine has available.