Brazil was my first country where staying on a typical 3-6 month tourist visa wasn't sufficient. I met incredible people, rented a room in a huge flat half a block from the beach, and decided to stay at least until my original housemate would leave.
Once my tourist visa ran out after six months, I became an illegal resident in Brazil, which meant, amongst other things, that I would need to lay low — avoiding police, etc. I also couldn't really leave the country and come back like a lawful resident. My Christmas was spent on Ipanema Beach, while my expat friends all spent their holidays in their respective countries with their families.
The right approach, of course, is that when you decide you want to move somewhere for an extended amount of time (more than 6-12 months), is to get some sort of a residence permit.
A residence permit gives you all the same benefits that a citizen would have. You are free to travel in and out of the country any number of times you want, you can open a bank account, and you might even have an ability to take advantage of the country's generous health care and other social benefits.
Most people who want to immigrate to a European country think that's a very difficult and complicated process — but it doesn't have to be this way. In fact, most countries make it pretty straightforward for you to become a long-term resident there because it means they'll be able to tax your earnings.
First, a quick clarification. Certain countries grant a so-called "long-term visa" which is essentially a right to remain in the country for far longer than any tourist visa allows. You don't become a resident under scheme, which means you're typically exempt from taxes, as well as using the country's healthcare services, etc.
There're typically four ways someone can legally live in the country long-term:
1. Get a (skilled) job
Many countries that are unable to fill their skilled jobs, so they're eager to offer work-permits to highly qualified candidates like doctors, IT workers, engineers, etc.
To make it easier, they might easily grant work permits to those who have a job offer/contract that guarantees a certain salary. For instance, Denmark offers work permits to those making over $66,000 per year, Ireland offers work permits for those making over $36,000 per year.
If you have certain higher education (Masters, PhD) in a highly sought out profession, that can greatly expedite your visa application. For instance, Denmark has a "Positive List" program which lists in-demand jobs.
If you qualify, you get a resident and work permit for the duration of the contract (up to 2-3 years) which can be renewed later.
2. Self Employment/Retirement
You have to be able to demonstrate that you're making enough to cover your own expenses, and that you have medical insurance so that you're don't start sucking off the resources of the host country's generous social system (free healthcare, etc).
Some countries also ask that you can demonstrate having good amount in your bank account, as well.
3. Study in the country
If you choose to apply to a university or graduate school, you also get a residence permit for the duration of your studies. Most likely you won't be able to work while on this permit, though.
Many countries are more lenient in terms of what they consider a "school". I've known people that enrolled in small French-language schools in France and were able to get a student visa.
So, don't think you need to enroll in Sorbonne or Oxford in order to qualify for a student visa.
4. Marry a citizen
Marrying the country's citizen is one of the fastest ways to obtain the right to stay in the country.
In most cases, you'll need to be interviewed by the country's immigration officials where they would ask you how long you've lived together, how you've met, and which side of the bed each of you sleeps (next to the wall or not).
If you're approved, you'll be given a permanent residence permit, and after few years would qualify for citizenship.
Other ways, like seeking an asylum/refugee highly vary from country to country and are too complicated to be discussed here.
After certain number of years of living legally under a temporary resident work, you can apply for a permanent resident permit (in USA, it's called a Green Card), which is a right to reside/work in the country forever.
After being a permanent resident for several years, you can finally apply for naturalization (citizenship), and obtain that coveted second passport.
If you're a US citizen/resident, you need to pay tax on your worldwide income. That means you'll have to report your income regardless if you make it from US sources, and regardless if you're living in the US.
If you're not living in US, you may not need to pay tax on the first $95,000 (of your income, but you still need to pay self-employment taxes (13-15%).
That means that if you're living outside US on a long-term visa (such as in France), you don't need to pay income in either country.
On the other hand, if you become a resident (not a long-term visitor) of a foreign country, you will be obliged to pay taxes there, and not pay them in the US.
Straight To Citizenship
If you're a descendent (up to grandfather, I believe) of someone who is/was a citizen of certain countries like UK, Ireland, Italy or Poland, you maybe able to apply for citizenship or residency based on family ties.
I have friends in Argentina and Brazil that were able to obtain an Italian passport due to a grandfather being born in Italy before emigrating to Latin America. Making them instant EU citizens with the ability to work/live in any of 27 EU countries!