A letter of its own
In Spanish, ñ is not an n with an accent. It is a separate letter of the alphabet, called eñe, that comes after n in the dictionary. It stands for the “ny” sound in señor, mañana and España.
Leaving the tilde off changes the word. Año means “year” and ano means “anus”, so “tengo 30 anos” does not say what the writer intended. Peña (a rock or a club) and pena (sorrow) are another pair. Names such as Muñoz, Peña and Núñez should keep it too.
Where the tilde came from
Medieval Spanish scribes saved space by writing a double n as a single n with a small n above it. The small letter flattened into the wavy line we now call a tilde, and words spelled with nn in Latin, such as annus, became año.
The letter is also used in Galician, Basque, Filipino, Quechua, Guaraní and several other languages. Portuguese writes the same sound as nh and uses the tilde on vowels instead (ã, õ).
Typing it often
If you write Spanish regularly on a US keyboard, switch Windows to the “United States-International” layout: Right Alt + N then gives ñ, and the accented vowels are Right Alt + A, E, I, O and U. On a Mac, press and hold any letter to see its accented forms. For other accented characters and their codes, see the Alt codes list and the guide to typing special characters.