Imagine you have a lot of toys scattered around your room. You want to know how far apart they are from each other but you're too young to use a ruler (or maybe even count that high).
So instead, you start making a list. You pick up the first toy and write down all the other toys one by one, and how far away they are from the toy you're holding.
For example, if you're holding your teddy bear, you might write down that your building blocks are 4 steps away, your race car is 5 steps away, and your coloring book is 2 steps away.
This list is like a "distance matrix". It tells you the distance between every toy in the room!
Scientists and mathematicians do this same thing, but instead of toys they might be studying things like a group of planets or the genetic makeup of different animals. They make a "matrix" that tells them how far apart each "thing" is from all the others, and then they use this information to answer questions or make predictions.