Click to remove any connected group of the same color -- the group must be at least three blocks big. You have won when you have cleared the board.