A taxon is usually assigned a rank when it is given its formal name. The basic ranks are species and genus. When an organism is given a species name it is assigned to a genus, and the genus name is part of the species name.
There are definitions of the following taxonomic ranks in the International Code of Zoological Nomenclature: superfamily, family, subfamily, tribe, subtribe, genus, subgenus, species, subspecies.
The International Code of Zoological Nomenclature divides names into "family-group names", "genus-group names" and "species-group names". The Code explicitly mentions the following ranks for these categories:
The rules in the ICN apply primarily to the ranks of family and below, and only to some extent to those above the rank of family. Also see descriptive botanical name.
There is an indeterminate number of ranks, as a taxonomist may invent a new rank at will, at any time, if they feel this is necessary. In doing so, there are some restrictions, which will vary with the nomenclature code which applies.
There are several acronyms intended to help memorise the taxonomic hierarchy, such as "King Phillip came over for great spaghetti". See taxonomy mnemonic.