Basically, you pick a profitable niche for your online business, and then you find an affiliate partner who has products available in that niche. Some of the most popular affiliate sites are Clickbank.com, Amazon.com, and CJ Affiliate by Conversant (formerly Commission Junction). Between them, they offer just about any digital information product (like ebooks, audio files, video files) or physical product you can think of.
The key to success in this business is being very disciplined in buying. Limit your car buying to popular models that you can turn over quickly, models that you have a strong understanding of current local pricing on, cars that you can buy at a significant discount to the price you believe you can fairly sell them for, and cars that are highly unlikely to need major work.