M.2 is a form factor (physical shape/dimensions). It is in contrast to the traditional 2.5" form factor that many SSDs come in. It has no inherent effect on speed.
NVMe is an interface that operates over PCIe. PCIe/NVMe drives offer higher performance than SATA, although the difference in noticeable, real world performance isn't always that great. NVMe drives can be found in the following form factors: M.2 (most common), PCIe add in card, 2.5" drive (PCIe 2.5" drives are referred to as U.2 drives, these are not very common)
theyeti87 :
NVMe Drives are the fastest, followed by SATA M.2, followed by SATA 3.0.
There is no difference inherent speed difference between SATA M.2 and SATA 3.0