Before applying accent rules, you need to understand how syllables work in Spanish. Every word can be divided into syllables – and ONE syllable is stronger than the others. Put another way, we can say the sound of ONE VOWEL sounds louder than the others in the word.
HO – la you hear the "O" loudest
es – pa – ÑOL you hear the "O" loudest
gra – MÁ – ti – ca you hear the second "A" or "MA"
bien – ve – NI – dos you hear the "I" or "NI" loudest
If you can identify the strongest syllable (la sílaba tónica), you can apply the accent rules:
If we look at the same example words:
HO – la ends in A, so the next to last syllable should be stressed. It is, so it does not need an accent mark.
es – pa – ÑOL ends in L, so the last syllable should be stressed. It is, so it does not need an accent mark.
gra – MÁ – ti – ca ends in A, so the next to last syllable should be stressed. However, the third from the end is stressed, so it DOES need an accent mark.
bien – ve – NI – dos ends in S, so the next to last syllable should be stressed. It is, so it does not need an accent mark.
Video: Accent marks in Spanish basic rules by MyJSalmon. This is a clear explanation and doesn't rush. The video is 14 mins but the explanation ends at 9 mins, followed by examples.
URL: https://youtu.be/f75VaiK7z0Q
Video: Spanish Accent (pronunciation) Rules - Las reglas de acentuación by MaestroKaplan. This is also a good explanation although he moves more quickly.
URL: https://youtu.be/H7HIxXgKilI
Yepes Spanish Grammar Manual's Unit 1: Alphabet, Spelling, Written Accent, Capitalization.
For the accent rules in particular, see the explanation - and especially the summary - on the Stress and Written Accents page
For additional explanation of how to divide a word into syllables, see Appendix 17.2: División silábica.