If you want to live in Switzerland without working, you must apply for a residence permit from the cantonal immigration and labor market authorities.
You must additionally secure a visa from the Swiss representation abroad, depending on your nationality.