OE = original, branded part
OEM = part made by the OE manufacturer, without car marque branding. Usually off the same production line (but not always!). In some cases this is really obvious, such as all the other markings being identical or where they've clearly ground off the logo that was on the moulding!
Aftermarket/pattern = unofficial replica by another manufacturer.
I had my M3 roof glass/sunroof replaced by National Windscreens but the glass was still OE and branded (but through their supply chain). All the companies I contacted for quotes said that windscreens are available OEM now (ie identical but sans Tesla logo) but all other glass is OE only