Basically the program is trying to access something that its not allowed to to (like instructions that only the operating system is trying to use or accessing memory that belongs to some other program). Basically what Pab said, with the addition that it doesnt mean the cops will be at the door to arrest you any second...

The reason it annoyingly has to stop the program is that suddenly something the program expected to happen can't happen, so shutting it down is far better than letting it carry and get all confused, which would probably cause it to go a little insane and bad things would happen (especially if it was in the middle of writing stuff to the disk or something like that).