Since the introduction of SSM onboard warship! Counter measures will also deploy rapidly to counter the deadly threat of these SSM.
The most famous incident is the Israel/Arab war which saw Egypt navy fire the styx SSM to sunk Israel Eilat destroyer. Subsequently ,Israel navy deploy chaff as missile counter measures to evade 54 styx SSM fire at Israel missile gunboat before reaching the firing range of their short-range SSM to destroy the Egypt fleet!
SSM counter basically break into 2 catergory of soft-measures like the one mention above,chaff!
-Basically to fire before missile hit the target and act as a decoy to lure the missile to hit the decoy instead of the target shit
Example
The Super Barricade Decoy System

The second catergory is the hard-measures which is also under 2 types with using firing large number of projectiles to create a wall on the directional of missile which will make almost impregnable against SSM. One,two projectile or more hit on the missile is enough to knock it out.
The 30mm Thales Nederland Goalkeeper close-in weapon system

Another one of the hard-measures will be the missile intercepting type which mean missile against missile(Anti-missiles system)
Barak
Ship Point Defense Missile System

Which missile defence system u r most comfortable with if u want to include in yr ship defence if u can only choose one out of the three type!