In physics, displacement is a vector that points from its point of origin to the point of its destination.
When an object moves in space physically from A to B, then displacement is the vector AB, that is indicated by the the direction AB and magnitude = length of the straight line segment AB.
Displacement is the shortest distance between two points. It has magnitude and direction. Its units are same as that of distance. The difference between displacement and distance, is that displacement can also be negative and 0, even when distance travelled is not 0.
If a person travels from one corner of a square (of side a) all along the square and reaches the opposite end of the diagonal, the distance travelled is 2a. and the displacement is √2 a.