Mac OS X comes with a pretty easy way to type spanish characters without changing the keyboard layout or language. This is how:
For vowels with an acute accent just press "Option" key and the "E" key at the same time, then release them and press the vowel you want to be accented:
á -> Option + E, A
é -> Option + E, E
í -> Option + E, I
ó -> Option + E, O
ú -> Option + E, U
For capital vowels just press the "Shift" key before the vowel if you don't have the "Caps lock" activated:
á -> Option + E, Shift + A
é -> Option + E, Shift + E
í -> Option + E, Shift + I
ó -> Option + E, Shift + O
ú -> Option + E, Shift + U
For the ñ or Ñ characters the process is very similar:
ñ -> Option + N, N
Ñ -> Option + N, Shift + N
And for inverted question and exclamation marks:
¿ -> Shift + Option + ?
¡ -> Option + 1