Firstly, you have to ascertain if it is a fish that pulled your line into the rocks or if the line is snagged on the bottom. The difference between the two is that in the former you will feel a definite strike on your rod first – from the fish biting – before the rod gets stuck; if on the other hand you feel a constant pull without any strike, chances are your line is snagged on the bottom, probably on some rocks or coral.
If you are constantly getting your line caught (“sangkoh”) on the bottom, you will need to lift your rig off the bottom and be alert to the feel of the line coming into contact with bottom structures. Once you feel structure, lift your rod tip and move your rig up and away.
If it is really a fish that has taken your rig into the rocks, slack off on the pressure, maintain a slightly taut line and hold the rod lightly, just enough to feel for any movement from the fish. Watch the rod tip. The moment you detect some movement, pull hard and try to yank him out of the rocks.
One trick that has worked for me several times in the past is to attach a sinker with a snap onto the main line and slide it down, hoping that the weight will either strike or startle the fish into moving just a little so it can be dislodged. This works especially well on luring or jigging situations when there are no obstructions in your rig and the sinker can reach the fish directly.