The equation
y = x - 2
is the equation of a line in the slope-intercept form with a slope of 1 and a y-intercept at (0, -2).
You can graph it by locating two points on the line. One point is (0, -2). The other one can be found with the slope. The slope of 1 means that the next point is 1 unit to the left and 1 unit up, respect the previous point. In this case, the next point is (1, -1). After you locate these two points, draw the line that connects them, as follows