The goal is to have points in the positive (to the right) beyond the flag after 13 alternating turns. You match similar icons in all directions from the one you selected. The numbers are totaled from the matches and that is added to your score. The opponent meanwhile does the same and those points are deducted from the score bar, moving it left.

As for the bonuses, I've only seen them a couple of times and have yet to discern a pattern as to what triggers them.