From what I understood, allele frequency spectrum is everything that concerns the frequency of all of the alleles studied in a population. It can be estimated with Tajima's D, theta, etc.

But how is it different from the joint allele frequency spectrum?

Joint allele frequency spectrum is allele frequency distribution calculated between two\three populations. Imagine a 2D plot, where on x axis is AFS of population 1 and on y axis is AFS in population 2. For example, you can plot derived allele counts in Yoruba versus Central European population. Let's say, you count allele A x times in Yoruba and y times in Central Europe, then you plot it on 2D space. For three populations it will be a 3D plot. Upscaling this to a higher number of populations is computationally very hard.
Joint AFS is informative about migrations and other parameters, because changes in jAFS will reflect changes in demography.

Cool! That's great! But if I read the axis on the graph, it's from 0 to 20 which makes 21 comparisons.

we projected the data down to 20 sampled chromosomes per population

Where is the 21th comparison coming from? Also, is JAFS only on chromosomes or it can be on SNPs?

In addition if you have 2 populations, it's actually a 3D graphs (the elevation is the colour). Also, usually, the colour is the number of SNPs between two chromosomes. Can it be something else?

My explanation is very simplified, I just made it to be intuitive. Furthermore, I guess these numbers may be log-transformed for plotting, and I don't remember exactly what they did for these figures.
AFS is estimated from allele counts, i.e. how many times you see a SNP in a population. 20 chromosomes means there were 20 haplotypes, which can mean, for example, 10 imaginary individuals with a pair of chromosomes in each. I suggest reading this paper, it goes into details about allele counts, AFS and related concepts https://www.nature.com/articles/nrg4005

Cool! That's great! But if I read the axis on the graph, it's from 0 to 20 which makes 21 comparisons.

Where is the 21th comparison coming from? Also, is JAFS only on chromosomes or it can be on SNPs?

In addition if you have 2 populations, it's actually a 3D graphs (the elevation is the colour). Also, usually, the colour is the number of SNPs between two chromosomes. Can it be something else?

My explanation is very simplified, I just made it to be intuitive. Furthermore, I guess these numbers may be log-transformed for plotting, and I don't remember exactly what they did for these figures. AFS is estimated from allele counts, i.e. how many times you see a SNP in a population. 20 chromosomes means there were 20 haplotypes, which can mean, for example, 10 imaginary individuals with a pair of chromosomes in each. I suggest reading this paper, it goes into details about allele counts, AFS and related concepts https://www.nature.com/articles/nrg4005