- You can only stay 3 months to look for a job. You can stay indefinitely without a job if you can prove you have the means to support yourself.
- You can stay in Switzerland indefinitely with a job, you just need to renew your permit every 5 years, which is essentially a rubber stamp because of freedom of movement agreements.
- You're only able to get a permanent residence permit after 5 years if you're a national of a subset of EU countries (list at [0]) or you're able to demonstrate that you're well integrated (the most burdensome criterion for that is speaking one of the canton's languages at B1 or better). Nationals of other countries who don't go for the exceptional integration pathway have to wait 10 years like most other countries.
[0]: https://www.sem.admin.ch/sem/en/home/themen/aufenthalt/eu_ef...