"Trog" was a term used by natives of the "P7E planet" to refer to the lowest class of resident. It was likely an insult, although those who were "Trogs" used the word of themselves. "Trogs" were essentially a slave class, used by the authorities to mine the rocks which had coalesced around what remained of the P7E. In order of societal rank, "Trogs" were commanded by Guards, who were in turn commanded by the Seers, and ultimately, the Oracle.
All "Trogs" — just like all residents of that pseudo-planet — were in fact descended from the Minyans who had originally manned the P7E. Eventually, a sizable number of Trogs escaped on the R1C. A few Trogs, namely Idmon, Idas and Naia, made contact with the Fourth Doctor, Leela and K9. (TV: Underworld)