There are four types of Spanish words that determinate where the stress of the word goes. Below, you can see the different types and when we put a written accent over the word (tilde)
Agudas: When we put the emphasis at the end of the word.
We write accents if they end in a vowel, in n or s.
Ratón, melón, reloj, Caridad,
If you wish to write accent (tíldes) with a English keyboard, read this article
Llanas o Graves: When we put the emphasis on the second to last (penultimate) syllable.
We put and accent on the word if it does not end in a vowel, or n, or s.
Árbol, cama, Cárcel, queso.
Esdrújulas: When the stressed syllable is in the third from last (antepenultimate) syllable of the word.
These words always use written accents.
lámpara, teléfono, índice,
Sobreesdrújulas: take the accent on a syllable preceding the antepenultimate. The words within this type have all written accents.
If you wish to write accent (tíldes) with a English keyboard, read this article.