By matching three cubes of the same color, you make them disappear. Use the up arrow to change the order of the cubes.