A pure substance melts at one exact temperature. This is called a sharp melting point. Pure ice melts at 0°C, and the temperature stays at 0°C until all of the ice has melted.
A mixture does not have a single melting point. It starts to melt at one temperature and finishes melting at a higher temperature, so it melts over a range of temperatures. The melting point of a mixture is usually lower than that of the pure substance. For example, salty water melts below 0°C and over a range.
This lets us use melting point data to test purity. If a solid starts to melt at 80°C and is completely liquid at 80°C, it has a sharp melting point and is pure. If sample X starts to melt at 72°C and is completely liquid at 78°C, it melts over a range, so it is a mixture. A narrow range means the sample is nearly pure, and a wider range means there is more of the other substances in it.