On Macs:
á Option + e , a
é Option + e , e
í Option + e , i
ó Option + e , o
ú Option + e , u
ü Option + u , u
ñ Option + n , n
¡ Option + 1
¿ Option + Shift + ?
The formulas above are multistep operations. To type an "á," for example, first press the Option key and hold it down while you press the key for the letter "e." Release both keys together and then press the key for the letter "a" (or any vowel you need to accent).
On Pcs:
Press Ctrl + ‘ + the vowel (ctrl + ' + a = á)
For ñ: Press Ctrl + ~, then the letter n (ctrl + ~ + n = ñ)