The GCode viewer allows you to examine the results of your slicing settings before a print begins. When using CuraEngine, the default octoprint slicer, the 2D viewer will provide you with preview images of your 3D print before committing filament to it.
This is a top-down cross-sectional view depicting the nozzle path along the X and Y axes. Green lines represent travel moves, where no plastic is deposited. Black lines represent printed material. Red spots represent filament retraction.