I stayed home from school because I had a cold.

Literal

Cold [object-を] caught [reason-ていたので], I [topic-は] school [object-を] rested.

学校を休む means 'to be absent from school' — を marks the place being absent from. ~ていたので gives the reason: 'because I had (been having) a cold.'