The five kingdom system groups organisms as animals, plants, fungi, protists and prokaryotes. It was based mainly on the structure of organisms and the type of cell they have.
Later, scientists used genetic analysis. They compared the sequences of bases in genes, such as the genes that make ribosomal RNA, in many organisms. This showed that the prokaryotes are really two very different groups. Archaea, which include microorganisms that live in hot springs and salty lakes, have genetic sequences as different from bacteria as they are from eukaryotes.
This led to the suggestion of three domains, which sit above kingdoms. The domains are Archaea, Bacteria and Eukaryota. Eukaryota contains animals, plants, fungi and protists. So the five kingdoms are replaced by three domains, with the prokaryotes split into two domains.