To be honest, not really, I tend to just bumble along working from other peoples examples and generally get where I want to be in the end. The syntax has always been a black art to be fair
That extra semicolon was ending the if-statement. The digitalWrite() after it would have been executed regardless of the condition, which would have been really confusing if the code had compiled and uploaded. Because the if-statement was ended, the else had no if-statement to belong to, hence the error message.