How terrorism works, and what we should (and shouldn’t) do about it