Law:
Laws are more formal, A group of representatives get together spend time and resources to come up with laws which can be applied to entire society, everyone with no exceptions
They are usually written and be applied/enforced by officials like police etc.
Laws are more serious than rules in terms of consequences.
If you break a law You will be punished more seriously than breaking rules.
Rule:
Rules are more local, e.g. parents set up rules in house. If a kid eats too much of candy, no one from police comes to punish that kid, right? because that's just a rule applied to kids of that house not every one
but if that kid makes a loud noise and disturbs neighbours then an official will be called to take care of the kid, as he/she has bracken the law
For your website you set up rules, e.g. if a user gets too many negative points gets kicked out, but if a user posts a naked picture of his/her friendan official will be applying the law
Laws are broader, law of physics, traffic law,
rules are more local, rules of a game, parietal rules, etc
Hope that helps :)