In general, any Swiss entity that sells VAT-able goods or services for at least CHF 100,000 per annum is subject to VAT. When starting a business it is important to try to establish if the turnover for the first year is likely to be above that figure. Furthermore, if the turnover for the first three months is also at least CHF 25,000 then VAT registration may also be necessary. Businesses and independent traders may also wish to voluntarily register for VAT even if the threshold is not met.
Foreign business with a worldwide turnover of at least CHF 100,000 and selling into Switzerland are also supposed to register for Swiss VAT when selling to Switzerland. When registering for VAT it can also be interesting for smaller companies to consider the type of VAT system that they wish to use.
If an already established Swiss business has a subsequent turnover over the threshold then it needs to register for VAT in the year after it has passed the threshold (https://www.fedlex.admin.ch/eli/cc/2009/615/fr#art_14 (point 3)).
The tax liability ends when the business ceases to trade or when assets have been sold off. If the threshold is no longer met, and it is not expected to be over the threshold for the following year then it is possible to deregister at the end of the year when the threshold is not met. Deregistration requests must be submitted to the Federal Tax Administration within 60 days of the end of the tax period in order for these to be accepted (i.e. typically before the end of February).
More information is available at https://www.estv.admin.ch/estv/en/home/value-added-tax/vat-tax-liability.html.