The X3 means play 3 times, but it is misplaced. It should be at the beginning of the repeated section. The 1.2. means "play these bracketed measures the first two times", and the 3. means "play this bracketed section the third time."
To understand the marking, it must first be made clear to where the repeat sign at the end of m. 16 returns: either the beginning of the piece or to a matching repeat sign prior to m. 13. I'll refer to that point as A.
So you start playing at the beginning, and you reach m. 14. This being the first time through, you play the bracketed part marked 1. That bring you to m. 16 at which point you return to A.
Now this second time through, when you reach m. 14, you play the bracketed part marked 2. This again brings you to the m. 16 repeat and back to A.
The third time through, at m. 14 you skip the bracketed measures marked 1.2., and continue at the bracket marked 3 (i.e., m. 17).