Hrad refers to castles built roughly before 1500. Think of the Middle Ages, fortifications, towers and moats.
Zámek is more of a manor house or French château.
'Ruin' is either ruina or zřícenina.
Endless_sleepers's explanation is excelent. For those interested, especially Slavic languages speakers:
hrad is a very old word closely related to grad or gorod in other Slavic languages where they often mean a city. It is derived from "hradit" which mean to fence (i.e. fortify). Cf. ohrada - a particular type of fence.
A modern a château or a manor house - zámek or zámeček - is not a fortified place but a residence. The word also means a lock (compare with German Schloss).