Legislation, or statute law, is created by government passing laws.
Case law is law that is created by the judgements of courts ie how cases are decided.
So, there are usually statute laws dealing with physical assaults. Usually, these laws allow self-defence. But what is self-defence? There are obviously many scenarios and these are examined in courr as they arise. For example, in the UK if you were asaulted in the street and the assailant ran away, case law has decided that running after the person and hitting them back is not self defence. You are no longer defending yourself but exacting revenge.