Would be good if you can provide details of your tank and equipment. Did you do any research into this hobby before setting up your tank? Instead of confusing you with more jargon, read this very simple article first:
Then maybe you can come back and tell us what went wrong.
Fishes 'run here and there' is normal. I would be more worried if my fishes 'sleep on the sandbed all the time'. And they are probably just seeing their own reflection, tt's why they keep attacking the glass. Dude, pls read up more if you wanna keep marine fishes...