Fixed rates trade certainty for cost: the borrower pays a premium over the variable rate (the term premium) to lock in payments. The longer the fix, the higher the premium, but the more insurance against rate volatility.
In Switzerland, 5-, 10- and 15-year fixed-rate mortgages dominate, often combined into a 'tranche' strategy spreading maturities to limit refinancing risk. US mortgages are heavily 30-year fixed — uniquely long because they are federally backed and prepayable without penalty.
A borrower locks a CHF 800k mortgage at 2.5% fixed for 10 years; even if rates rise to 5%, monthly interest of about CHF 1,667 stays the same until the term ends.