Capitalism != free market.
Under a free market, a painter buys paint, an easel and some canvas at prices set by supply and demand, and then paints and sells portraits again at a price set by supply and demand.
Under capitalism, an artist wants to start a painting business, so he goes to a rich person or group of rich people and says "If you give me some money to start my painting business, I will give you a share in ownership of the business and its profits." with this so-called capital, the artist rents or buys a building and supplies and operates the business to effectively pay back that loan. The working class make a living and the rich get richer for having been rich.