There are a few aspects to this. First off all N-Registered aircraft must be owned and operated by a US based entity. As has been mentioned this could be any US based company or US resident. In reality foreign companies can set up US based branches or entities fairly easily under which to own the aircraft. The aircraft must also comply with all FAA regulations for maintaining the N-Number (annual inspections etc.) This means that the aircraft must be inspected at an FAA approved/licensed facility (they do exist outside the US). The planes can (if practical) be flown back into the US for inspections if no foreign facility is available.
When it comes to flying the plane the pilot must carry what ever is locally required to fly in and out of that country/airspace both from an equipment standpoint and a pilot standpoint. Many countries will accept/recognize different pilots certificates for inbound international traffic, that is the subject of its own question as there are many combinations out there. For what its worth the US FAA certificate and the ICAO/EASA certificate are pretty highly recognized around the world.