To be legally liable for something, you first have to be found liable by a court of law. Sometimes, this process is very straightforward. If you intentionally hurt someone, of course you’re liable for their injuries.
You can be liable for accidental injury or damage if the legal process determines that you were negligent, and your negligence caused harm to someone else.
Negligence means you didn’t do what a “reasonable” person would be expected to do in a given situation. Much of the legal process in these cases involves determining if the accused acted reasonably.