Earlier quoted context omitted.
The definition of terrorism is controversial and political, so there isn't a hard answer. But I think a general distinction is the targeting of combatants vs civilians. There is a difference between infiltrating military or para-military organizations or operations and intentionally targeting mass casualties of civilians for attention.
The entire US is going to freak out if a platoon of KGB soldiers flew into US and killed hundreds of bad guys. How objectively bad the "victims" might have been isn't going to matter. You can't just walk across a recognized international border and do the "right" thing without a consent, regardless of how right or wrong it had been. That's an act of war, technically.
You might want to read up on the killing of bin Laden, Entebbe raid, and many other similar operations.