If a part on your vehicle demands replacing there are three options for replacement.
First, you can find a factory OEM part by either going through a dealer or contacting the manufacturer directly. Factory parts are built by the OEM manufacturer to the exact same specifications as the existing parts. New OEM components are generally the most expensive option but often yield the best fit, durability and overall quality. If you own your vehicle and are thinking of reselling, documenting repairs using factory parts can increase the resale value of the vehicle.
Second, you can find a new aftermarket part from a variety of parts dealers online and at shops around the country. Aftermarket parts are often exact replicas of OEM parts but are built by companies not associated with the primary auto manufacturer. While aftermarket pieces are less expensive than their OEM counterparts, they also may suffer in terms of quality, fit and finish. Aftermarket parts are great to get a car back up to speed if the budget is an issue and fit/quality do not matter. However, some aftermarket companies produce pieces that are of exceptional quality.
Third, you can find a used factory (or maybe even a used aftermarket) part at a salvage yard or from a private seller. Good used factory parts are a great way to save money and get an OEM specified piece at the same time. Obviously, used parts are subject to wear and are highly variable in their quality and usability.
To determine the best method of replacing a part, check with you dealer, owners of similar vehicles and on the Internet to determine what option makes sense. You know the new OEM part will work, so read online testimonials to see if aftermarket replacements are worth the cost. You can also gain insight that's helpful in a used search, learning the common defects/attributes of a part before buying it yourself.
Many suppliers offer both OEM and aftermarket parts for a broad range of vehicles. Some specialty parts may not be produced in the aftermarket if demand does not warrant investment. Tracking down these obscure pieces may require consulting a parts specialist. Some dealers have caches of unused factory parts, often called New Old Stock (NOS) or New Old Replacement Stock (NORS). These command high prices especially when out of production.
Like replacement parts, some add-on accessories are factory authorized while others are produced in the aftermarket. Depending on the popularity of a vehicle, a variety of special components exist to modify it. Engine enhancements, body kits, interior pieces, electronics, exhaust systems, wheels and tires are among the many elements that contribute to customization.