Something troublesome happened after school.

Literal

After-school [at-に] troublesome thing [subject-が] occurred

面倒なこと — the na-adjective 面倒な (troublesome) modifying こと (thing/matter). 起きた (past of 起きる) shifts from 'to wake up' to 'to happen/occur' when the subject is an event rather than a person.