Completely different things.
Martial Weapon relates to if a character is trained in how to use that weapon or not. Heavy weapons are used with disadvantage by small characters, and it affects the Great Weapon Master feat. Most heavy weapons are also two handed, but there are exceptions in PnP.
A rapier is a martial weapon that is not heavy or two handed. A greatclub is a simple weapon that is heavy. A pike is a heavy weapon that can be used one-handed whilst mounted. And so on.
D&D core rules can be found online as a free download.