The first is to get a work visa in the destination country, the equivalent of the H-1B program in the United States. This typically requires that the employer sponsor you and go through a process proving you are not taking a position a local could fill.
The second is to get a work-rotation visa in the destination country, the equivalent of the L-1 program in the States. This type of visa lets companies rotate employees among their offices in various countries. It's often used for executives to help them gain experience across different corporate units but can be used for other positions as well. Global consultancies, federal agencies, and multinationals are the typical venues for such positions.
The third is to use dual nationality you may hold, such as from being the spouse or child of a foreign national, to seek work in that other country. After all, as a citizen of that nation, you have the same employment rights as any other citizen. (The fact that you are also a U.S. citizen doesn't matter, at least in countries that allow dual citizenship.)
The fourth is to set up your own company in the United States and be a consultant overseas.
Some locales, like Costa Rica, actually make it easier for foreigners to come in and start a company rather than come in as an employee who might be taking a job away from a local.
The top regions and cities to explore for overseas tech jobs
Based on dozens of interviews, InfoWorld has come up with the following regions and cities worth exploring if you want to offshore yourself: