Cheap basic lodging: hostels
One of the cheapest accommodation types is the (youth) hostel. Swiss hostels in general are of good quality, but rooms are basic. Staying in a dormitory (e.g. 6 or 12 beds per room) is the cheapest way to spend the night. Price-wise, private rooms with shared bathrooms in the corridor are second best. Most hostels also offer rooms with a private bathroom.
Other budget hotels
Youth hostels are not the only option. There are affordable basic hotels as well, even on top locations. The best ones can be found here.