What makes a terrorist a terrorist, ...
For the most part, terrorists are desparate people with serious grievances.
The current way of dealing with terrorists only increases grievances and raises the degree of desperation. It creates more agrieved people, and causes more people to become desparate. The current US foreign policy is the best recruiting tool for terrorism that there has ever been.
... and how do people separate "legitimate" forces from terrorists?
It's a them against us mentality.
When those that we consider our peers have grievances against us, we address those grievances and come to some sort of negotiated settlement. When those that we consider inferior have grievances against us, we initially ignore them. And if they then act on their own to address the grievances, we declare them terrorists and set about killing them off.
It's good old fashioned racism and bigotry. As a "Christian" nation, our policies display the "righteous" hatred, "righteous" bigotry, "righteous" racism that comes from fundamentalism. If we were truly Christian, we would be finding better ways of dealing with agrieved people.