The use of lower/upper case letters and
n letters in genomes sequences is not completely standardised and you should always check the specification of the resource you are using.
Lower case letters are most commonly used to represent “soft-masked sequences”, a convention popularised by RepeatMasker, where interspersed repeats (which covers transposons, retrotransposons and processed pseudogenes) and low complexity sequences are marked with lower case letters. Note that larger repeats, such as sizable tandem repeats, segmental duplications, and whole gene duplications are not generally masked.
However, there are other uses for lower/upper case letters, for example, Ensembl have used upper/lower case letters to represent exonic and intronic sequences respectively.
n nucleotides may represent “hard masked sequences”, where interspersed repeats and low complexity sequences are replaced by
ns may alternatively represent ambiguous nucleotides, indeed this is the IUPAC specification.
Also note occasionally (although fortunately rarely)
x is used to represent ambiguous nucleotides or “hard-masked sequences” too.