The mark over the n in the English word “piñata” is a tilde.
In Spanish, ñ is treated as its own letter, called eñe, rather than simply an n with an optional accent. The wavy mark above it is the tilde, also called a virgulilla in this specific Spanish context. The letter developed from medieval scribal abbreviations of the double-n spelling: a small line written above n indicated that another n had been omitted.
The tilde has other jobs in different languages. In Portuguese, it marks nasal vowels, as in ã and õ; in Vietnamese, it marks a particular tone; and in phonetics, it can indicate nasalization. In English writing, the standalone symbol ~ commonly means “approximately,” as in “~30 minutes.”
A common mix-up is to call the mark an accent. Spanish uses acute accents on vowels to show stress, but the mark in ñ is specifically a tilde, and ñ is a distinct alphabetic letter in Spanish.