Ok, it's because at the boiling/melting points, when the state change is occuring, the substance, be it a solid or liquid at the time, absorbs all heat energy until all of the substance has been converted to the new state (liquid or gas). The temperature doesn't rise because all the heat is being absorbed by the substance. That's the simplest way of putting it I spose
probably could be worded better too xD. If it doesn't make sense ask me to clarify it