A heteroatom is any atom that is not carbon or hydrogen (in an organic compound)
The 23 elements and their prefixes are defined by the IUPAC Gold Book and the Hantzsch-Widman system, given in order of priority. (The heterocycle in the image is Pyridine, the heteroatom is nitrogen)