You need to stack the bricks so that they go horizontal, upright, horizontal, upright... you get the idea. To do this use the left and right arrow keys to move and use the space bar to turn yourself around.
I used a coding E-book.