Monitor Display works fine after Slapping

I have CRT Samsung Sync Master Monitor. I am using it from past 2 years. It used to work fine but now the display goes off automatically and sometimes the colors are distorted and when I give a hard slap to my monitor it starts working fine. What is the issue? How to resolve it?
