This is great and well known color combination brain teaser puzzle.
Arrange the cubes in a line, so that all 4 colors (red, black, yellow, green) appear simultaneously on all four sides. Each side will have a Red, Yellow, Green and Blue Dot showing.
There are also other challenges to be solved where the goal is to arrange the pieces an colors in a very specific way. Instructions included.