She understood what he was saying.

Literal

She [topic-は] his [genitive-の] saying thing [object-を] understood.

言うこと ('what (someone) says,' literally 'thing said') is one of the most common 'free relative' constructions in Japanese — using こと to nominalize a verb phrase. 理解する ('understand') is the more formal/intellectual cousin of わかる ('get, understand'); takes its object with を. Compare with わかる, which would mark the understood thing with が — typical reflex of stative vs. action predicates.