Accents or Tildes as they are called in Spanish are used for different reasons. They are used to indicate which part of the spoken word is stressed. They can also help to show if something is a statement, a question or an exclamation.
If a word has an accent mark then this is where the stress should be. If however there is no accent the following rules should apply.
If a word ends in a consonant (not n or s) the accent will be on the final syllable e.g. ciudad – ci-ud-ad, comunidad – com-un-id-ad.
If a word ends in a vowel, n or s then the accent will be on the second last syllable e.g. casa – ca-sa, toro – to-ro.