tar.gz and tar.xz both are compressed tar-files, but with different compression methods. tar.gz is compressed with the gzip compression utility, tar.xz with the xz utility. For the user there is no difference when extracting those files, both behave exactly the same.