Can somebody explain hockey fights to me?

apparently in hockey it's legal to fight. in any other sport you would be suspended and fined and all that. like what are the rules? can you fight when ever you want or what?and what are the rules to it?
Update: well i mean the refs just stand there and watch. any other sport the cops would come break it up.
16 answers 16