In Ancient Greece, racism was expressed in several ways, including through the concept of "barbarians," which referred to anyone who did not speak Greek. The Greeks believed that they were the superior culture, and anyone who was not Greek was inferior. This idea of cultural superiority and inferiority was deeply ingrained in Greek society, and it was reflected in their art and literature. For example, the Greek playwright Aristophanes often portrayed foreigners as uncivilized and foolish in his comedies.
Additionally, Greeks believed that their gods were superior to those of other cultures, and this was reflected in their myths and epics. For example, in Homer's "Iliad," the Trojan prince Hector refers to the Greeks as "sons of Atreus," implying that they are the offspring of a mortal king, while the Trojans are protected by the god Apollo. This idea of divine favoritism was also reflected in the Greek practice of consulting oracles, who were believed to be able to communicate with the gods and provide insight into the future.
Slavery was also a common practice in Ancient Greece, and slaves were often of different races than their Greek masters, which also reflected a belief in racial superiority. Greeks believed that certain races were naturally suited to slavery, and this belief was used to justify the practice. In fact, the word "slave" is derived from the name of the Slavs, who were a group of people from Eastern Europe who were frequently enslaved by the Greeks and Romans.
Overall, Ancient Greek society was deeply stratified along racial and cultural lines, and these divisions were expressed through their art, literature, and social practices.