The ACLU has provided a primer on how NSA probably eavesdrops on electronic communications:
The NSA is not only the world's largest spy agency (far larger than the CIA, for example), but it possesses the most advanced technology for intercepting communications. We know it has long had the ability to focus powerful surveillance capabilities on particular individuals or communications. But the current scandal has indicated two new and significant elements of the agency's eavesdropping:
1. The NSA has gained direct access to the telecommunications infrastructure through some of America's largest companies
2. The agency appears to be not only targeting individuals, but also using broad "data mining" systems that allow them to intercept and evaluate the communications of millions of people within the United States.
The ACLU has prepared a map illustrating how all this is believed to work. It shows how the military spying agency has extended its tentacles into much of the U.S. civilian communications infrastructure, including, it appears, the "switches" through which international and some domestic communications are routed, Internet exchange points, individual telephone company central facilities, and Internet Service Providers (ISPs). While we cannot be certain about these secretive links, this chart shows a representation of what is, according to recent reports, the most likely picture of what is going on.