OEM means Original Equipment Manufacturer, so an OEM part was built by the same manufacturer, and maintains the same quality.
An After Market part was either made by a different manufacturer, or rebuilt/refurbished by some other company. Quality can vary, some being quite better than OEM quality, some lacking in quality.
Another term sometimes heard when dealing with older vehicles is NOS. That stands for New Old Stock, and although confusing, it refers to a part that was OEM manufactured, but ever sold. So, being for an older vehicle, they have been removed from a manufacturer's active inventory and typically sold to another business. That business, in turn, sells it as New Old Stock since it is a New part, but is considered Old Stock. Most rebuilders and restorers prefer NOS parts when they can be found.