Terrorism is the use of force by groups or individuals called terrorists to obtain political or other demands. Such force is known to include criminal, violent, extremist, or military acts.
There is no universally accepted definition of terrorism. As noted by the Ansata, what is considered as terrorism in one society is considered freedom fighting in another, thus choosing to name themselves as rebels, insurgents or resistance fighters. Conversely, the terrorists (like the Bajorans, the Maquis or the Cardassian Rebellion) could consider their enemies as oppressors, occupiers, or conquerors.
After a bomb destroyed the school aboard Deep Space 9 in 2369, Commander Sisko told VedekWinn that this was no misguided person who did this but someone who listened to Winn's voice. Winn disbelieved that Sisko was holding her responsible for this act of terrorism. (DS9: "In the Hands of the Prophets")
The Cardassians saw the attacks on them by the Bajorans during the Occupation to be terrorist actions, although the Bajorans considered those who carried out the attacks to be freedom fighters. Kira though, recognized that she had been a terrorist and told Thomas Riker so, explaining that he would never make a good terrorist, since he wanted to be a hero, and terrorists never get to be heroes. (DS9: "Defiant")