Does the NSF award grants to foreign researchers not affiliated with US instutitions? I mean the foreign researchers who are not affiliated with US institutions, and are located overseas. I suspect that NSF would not award them research grants, but need a confirmation.

I also imagine that NSF may award grants for collaborations of US and foreigners. It would be interesting to get a pointer to a resource which describes the conditions for such collaborations.
From the FAQs:


  NSF rarely provides support to foreign organizations. NSF, however, will
  consider proposals for cooperative projects involving U.S. and foreign organizations, provided support is requested only for the U.S. portion of the
  collaborative effort. For further information, contact the Office of International Science and Engineering. (Reference GPG Chapter I.E.6.) 


Individual funding opportunities list specific eligibility requirements. These generally say something like "The PI must hold an appointment at an eligible US institution." 

There is an office of the NSF specifically devoted to encouraging international collaboration, and there are often specific funding opportunities earmarked for collaboration with a particular country. You'll find examples of many such opportunities on the linked page.

Having said that, it's not impossible for NSF money to trickle down to foreign researchers. For example, I am at a US institution and I participate in a project supported by the NSF, in which our budget includes a subcontract arrangement involving researchers in Australia. As far as the NSF is concerned, this money is paid to a US institution (mine), but we are allowed to use some of it to pay our foreign colleagues as subcontractors. (The details of this arrangement were of course specified up front in our proposal.) Specific grants may have different requirements with respect to subcontracting to foreign institutions.