I caught a terrible cold during the trip.

Literal

Trip-during [time-に] I [topic-は] terrible cold [to-に] caught.

風邪にかかる (to catch a cold) is a set expression — かかる (to catch/contract) takes に for the illness. ひどい (terrible/awful) intensifies the severity. A straightforward past-tense narrative.