The primary sources of information on terrorist organizations, cells, and individuals vary, but the most important single sources involve electronic surveillance and human sources inside those organizations and cells. As the current controversy over the National Security Agency's collection of data on phone and computer communications revealed, the federal government is heavily reliant on electronic surveillance for tracking terrorists' movements and plans. According to media reports, those efforts have proven instrumental in preventing an indeterminate number of attacks.
In addition to electronic surveillance, the best information on terrorists comes from individuals within those organizations who cooperate with law enforcement or intelligence agencies, whether for money, over moral reservations about terrorist activities, or as a way of ensuring immunity from prosecution for their own crimes. Undercover law enforcement officers and intelligence operatives who succeed in infiltrating terrorist organizations also provide invaluable information to governments.
At the state and local levels, the technological resources are fewer, but the geographic expanse and scale of activity being monitored is also far more limited. Electronic surveillance, usually involving telephone wiretaps and eavesdropping devices planted in buildings and rooms known to be used by suspects, is used when possible. Local and state law enforcement agencies rarely operate alone, however, as terrorist activities fall under federal jurisdiction and consequently always involve federal agencies, mainly the FBI. Following the attacks of September 11, 2001, a series of Joint Terrorism Task Forces were formed across the country, teaming the FBI with local law enforcement so as to create a more unified investigative operation in which each agency shares information with the others -- a huge improvement over the pre-9/11 problem of agencies refusing to cooperate with each other at the expense of the national interest.
As frequently occurs in the counterintelligence realm, adversaries attempt to deceive each other regarding the focus of their activities. Terrorist organizations may not know whether they are being electronically monitored, but most assume that they are -- a problem greatly exacerbated by leaks to the media from individuals like Eric Snowdon -- and will occasionally deliberately feed false information to each other in the hopes that eavesdropping intelligence agencies will be convinced of the lie. Conversely, intelligence agencies will use informants and undercover operatives to feed false informtion, or disinformation, to terrorist suspects.
These, then, are the basic methods used in collecting information on terrorist organizations.