The example I've given is shown as an illustration in the picture. Suppose a jogger covers 2 km as he heads to the east. Then, he heads up north for another 1.5 km. Now, if you are to find the distance, you simply have to take the sum.
Distance = 2 + 1.5 = 3.5 km
If you are to find the displacement, you find the distance from the starting point to the end point, represented by the red arrow. Using the pythagorean theorem,
Displacement = √(2 km)² + (1.5 km)² = 2.5 km
If you are to find the magnitude of displacement, this is equivalent to distance. So, it is equal to 3.5 km. The displacement is a vector quantity, which presents the magnitude and the direction. The magnitude of the displacement does not take into account the direction of motion, just the total distance covered.