Distance: Is the length of the path travelled by an object between two points in space. From its definition, the distance is a scalar and it is always a positive quantity.
Displacement: Is the change in the position of an object. If at time \(t=t_1\) the object is at position \(\vec{r}(t_1)\), and at a later time \(t=t_2 > t_1\) the object is at position \(\vec{r}(t_2)\), the displacement vector is defined as \(\Delta \vec{r} = \vec{r}(t_2) - \vec{r}(t_1)\). In one dimension, the displacement vector has one component. For example, if the motion is along the x-axis, the displacement vector becomes \(\Delta \vec{r} = \Delta x \hat{i} = (x(t_2) - x(t_1))\hat{i}\). The component of the displacement vector can be positive, when the final position is larger than the initial one. It can be negative, when the final position is smaller than the initial one. It can aslo be zero, if the object ends at the starting point.