they are each special slots to plus stuff into. normally the pcie slot is for gpu's since it is nice and fast. the newer m.2 slots use the same pcie lanes that the pcie slot uses, just not as many. they should be equally as fast since they both use the same lanes. if you look at the spec sheet most of the time using an m.2 slot turns off some pcie lanes from the pcie slots.
the difference in the drive should be what slot it fits into for the most part.