In a displacement time graph, the time is on the X axis and the displacement of the body is on the Y axis. As, velocity is the ratio of displacement and time, therefore, the slope gives the velocity.
When slope is positive, it implies body is moving away from the starting (reference) point.
When slope is negative, it implies body is returning towards the starting (reference) point.