With so many potential restrictions and requirements it is inevitable that players will forget some from time to time and attack or block in a way that should not happen. In many cases this is caught immediately and players can correct the actions themselves. However in a tournament if an illegal attack or block has occurred the best course of action is to call a judge.
As mentioned above, assuming that the error is noticed quickly a judge can issue a penalty for a game rule violation and back up the game a bit so the game can proceed legally. However, if decisions have been made and actions have been performed since the illegal attack or block was made, it is likely that the game will carry on with the illegal attack or block. Judges are trained to apply the infraction guide and fix where possible, but cannot fix all situations. Players bear the ultimate responsibility to maintain the game and it is in their interest to know the rules, pay attention and make sure the game is legally played in the first place.