Article links to this publication which has all the information needed:
It is mentioned in the paper that:
Although we found only 4% variability in genomic nucleotides between
SARS-CoV-2 and a bat SARS-related coronavirus (SARSr-CoV; RaTG13), the
difference at neutral sites was 17%, suggesting the divergence between
the two viruses is much larger than previously estimated.
Their results highlight evolutionary changes in the development of new variations in functional sites in the receptor-binding domain (RBD). These developmental variations have a spike in changes to the RBD of SARS-CoV-2 and viruses from pangolin SARSr-CoVs
How do they define S and L variations?
They did population genetics on 103 available SARS-CoV-2 genomes.
These two major types are well defined by two SNPs which show complete linkage across the viral strains.
It also important to mention that SARS-CoV-2 was found to have 96.2% similairty to a bat SARS-related coronavirus (SARSr-CoV; RaTG13) but not very similar to SARS-CoV (79%) or MERS-CoV (50%).
How do we know that there's two type?
We know there's two types because from the 103 sequenced genomes two SNP locations show significant linkage. These are SNPs at location 8,782 (orf1ab: T8517C, synoniumous) and 28,144 (ORF8: C251T, S84L).
If you have a "CT" (as in base pairs) haplotype SARS-CoV-2 you've got the L-type ("L" type because T28,144 is in the codon of Leucine). Otherwise, if you've got a "TC" haplotype you have the S-type (C28,144 is in the codon of Serine).
They found that S-type is the ancient (less aggressive version) by aligning it with other older viruses. In fact for each variant of the virus the ancestral state was inferred by alignments of SARS-CoV-2 (NC_045512), RaTG13, and GD Pangolin-Cov.
So to be more precise on my answer for finding S and L types. You sequence the genome of an infected individual (you can find these online on NCBI) align it with the current reference sequence (MN908947, NC_045512), look at the SNPs and figure if they have a "CT" or "TC" haplotype to determine S or L type.