The distinction between phylum and kingdom as nouns is that the former is (biology|taxonomy) a rank in the classification of organisms, below kingdom and above class; it is also referred to as a division, particularly when describing plants; and a taxon at that rank, whereas kingdom is a nation with a king or queen as its supreme ruler.
In biology, a kingdom is the second highest taxonomic rank, just below domain. Kingdoms are divided into smaller groups called phyla. The hierarchy of biological classification's eight major taxonomic ranks.