as fishwatcher said about them moving to another area when they are hungry, plus you can gently pull them away from the rock but you have to be careful not to crush the shell or damage their foot (the part holding onto the rock). Also if you do it too often you weaken them physically and if they are stressed beforehand it could kill them. If they are on glass you can slide them along the glass and they usually let go but if they are on rocks just leave them be.