chātur-varṇyaṁ mayā sṛiṣhṭaṁ guṇa-karma-vibhāgaśhaḥ
tasya kartāram api māṁ viddhyakartāram avyayam
The four castes were emanated by Me, by the different distribution of qualities and actions; know Me to be the author of them, though the actionless and inexhaustible.
In plain words: Krishna says he created the four groups of people in society, based on each person's nature and the work they do. He made them, yet he himself does not act and never changes.