Losing your citizenship
For a natural-born citizen, losing your citizenship is actually quite difficult. The law prohibits the taking of your citizenship against your will, but there are certain actions a citizen can take which are assumed to be a free-will decision that constitutes a voluntary renunciation of the citizenship.
Moving to another country for an extended period of time does not constitute an act that presumes renunciation. Neither does taking a routine-level job with a foreign government. This stand is quite different from U.S. policy of the past, where even being naturalized in another nation could be seen as renunciation. The sections of the law that pertained to losing ones nationality for many of these cases was found at 8 USC 1482 and related sections.
The U.S. Code does, however, see some acts as creating the possibility of a loss of nationality. When you lose your U.S. nationality, you are no longer under the protection or jurisdiction of the United States. When the United States considers you to no longer be of U.S. nationality, it in effect considers you to no longer be a citizen. Note that these are things you can do that may force you to lose your citizenship. The law also says that these acts must be voluntary and with the intent of losing U.S. citizenship. The ways to lose citizenship are detailed in 8 USC 1481:
•Becoming naturalized in another country
•Swearing an oath of allegiance to another country
•Serving in the armed forces of a nation at war with the U.S., or if you are an officer in that force
•Working for the government of another nation if doing so requires that you become naturalized or that you swear an oath of allegiance
•Formally renouncing citizenship at a U.S. consular office
•Formally renouncing citizenship to the U.S. Attorney General
•By being convicted of committing treason