I stayed home from school because I had a cold.

Literal

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

風邪をひいていたので uses the ongoing past tense + reason ので — 'because I had been having a cold.' 学校を休む uses を to mark the school as the place being absent from.