Masonite is a proprietary term for hardboard made by the company of the same name. In the US, Canada and a few other places the term became generic, so people would refer to masonite, meaning any
hardboard. A simple search would have provided you with this answer BTW
Hardboard is a high-density board made from compressed wood fibre, bonded together essentially with heat and pressure only. It is usually 3mm or 6mm thick only and smooth on one side or both sides.
MDF is a medium-density board made from compressed wood fibre, bonded together with a resin and smooth on both sides. It is often available in a range of thicknesses from maybe 3 or 4mm at the lower end up to in excess of 30mm; 12mm seems to be the most common thickness in many places.
Although lighter in weight for a given thickness MDF is generally speaking stiffer and less prone to warping than hardboard, but these products vary widely.