The Local has published an article explaining who can become a Swedish citizen, or get a permanent residence, and how it's done. In short, it is easiest if you are a citizen of one of the Nordic countries and hardest if you are a citizen from a country outside the EU.
Read the whole article at The Local:
How to get Swedish citizenship or stay permanently in Sweden