Listen to what your parents say.

Literal

Parents [possessive-の] say [nominalizer-こと] [object-を] listen [command-なさい].

言うこと (what someone says) nominalizes the verb with こと. 聞く here means 'to listen to/obey' — a different sense from 'to hear' or 'to ask.' 聞きなさい is a parental-style command using なさい.