In a sense, the difference between terrorism and war is in the eye of the beholder. It's terrorism when the bad guys do it, it's war when the good guys do it.
But that's not entirely fair. Generally, the difference between terrorism and war comes down to two things:
- In war, you are at least supposed to be killing people with some military goal in mind. If you bomb a factory that is making military equipment and civilians die, it's sad, but at least you were trying to attack a military target. In terrorism, you kill people to make the other people scared and to get your point across.
- In war, you are supposed to have some way of wining other than just killing people -- you are trying to achieve some specific goals. In terrorism, the goals are secondary. What terrorists are mainly trying to do is just hurt their enemies even if there is no real goal in mind.