When she heard the news, she just cried.

Literal

She [topic-は] that [object-を] heard time, [just-ただ] [was-crying-泣いていた].

[verb-past]+時 ('when X happened') marks the temporal frame: 聞いた時 ('when (she) heard'). The comma after this phrase gives it an emphatic, dramatic pause. The main clause ただ泣いていた ('just was crying') uses past-progressive ~ていた to portray the crying as ongoing within that moment — not a single tear but sustained weeping. The adverb ただ frames the crying as her entire response: nothing else, just tears. The whole sentence is short but emotionally vivid, the kind of line you might find in a novel or memoir.