No, you usually have to pay for an internet connection. You need a subscription from an internet service provider, e.g. Swisscom, Sunrise or Salt. Alternative, cheaper offers are also available from Digitec, Yallo (belongs to Sunrise) or e.g. Wingo (belongs to Swisscom). You then pay a monthly fee for using the internet. It's not free, but it's very useful in this day and age.