The onset is composed of one or more consonants at the beginning of the syllable. It is optional.
The nucleus is composed of vowels (or syllabic consonants).
The coda is composed of one or more consonants at the end of the syllable. It is optional. It is also disfavored.
English is weird in that the syllabic barriers are sometimes vague. It's one of the few languages (others incl. German) where you can have several potential structures.
In the case of mirror, you can have two:
It can be MIR.ROR or MI.RROR. In either case, it's two syllables.