What is capitalism?
The simple answer is a society where the dominant, political-economic, social relation is capital. Or the ideological context that supports such a system.
Below is the longer explanation.
Capitalism (as in capitalist society) is a society in which the dominant social relation is capital. A social relation, in this context, represents relations that people hold with regard to one another, e.g., a parent to child, king to subjects, slave to master, etc. This social relation exists along with and/or beside slavery/servitude and feudal relations. A common error, or not so much an error as it is a key omission that hinders a more nuanced understanding, is not seeing feudal and slave relations as forms that play an integral role in the development, growth and maintenance of capitalist society. Capitalism represents, really, an evolved form of slave and feudal relations, particularly in terms of dominant, class-based, political-economic relations.
We saw this play out, significantly, with the American (U.S.) institution of slavery that saw slavery play as a substitute for the feudal and capitalist relations that were able to take place in European society, outside of the settler, colonial context of the Americans. In that same context, we saw how much of a role slavery, colonialism and the development of white supremacist ideology played in the development of capitalism and expansion of wealth and empire.
To distinguish, still, between capitalism and the feudal and slave relations compared above, the marking or distinguishing feature in capitalist society is the socialization and generalized production of commodities. This is production that is now done by and for all of society and where things are mass-produced. This can also be viewed in comparison to a society where this is done by individuals or small groups that mostly produce for themselves. Through the process of production and distribution, surplus value is created and appropriated privately, at least in most cases. There are certain exceptions where publicly provided services are granted and some level of control might be had by a popular majority of government relations. It, however, must be strongly noted that, for the most part, a feature of a capitalist society, as would be the case with any other social relation being dominate, it extends to state power. As it would be rather foolish to assume kings in a monarchy, aristocrats, lords or other religious leaders in theocratic relations did not assume the dominant control of the state.
Drawing again from the example of slavery in the U.S., we saw rather clearly, a slave-owning leadership class of Founding Fathers, extended through the vast majority of early presidents. When a post-Civil War, post-Emancipation structure transitioned, it immediately involved a class of Big Business who ushered in a Gilded Age. To connect even back to the original point about slavery and feudal relation, in the form of black codes, convict leasing and sharecropping/debt peonage, we saw neo-feudal, neo-slave structures play an extremely important economic and social role in that transition during the eras of Reconstruction and Jim Crow. In the realm of low cost and even particularly agricultural labor, during and after the Civil Rights era, we saw a transition to migrant and illegal immigrant laborers. The same, albeit legal, insistence on immigration took place following the Civil War, as well.
Back to capitalism, the socialized and generalized features of production are distinct from individual subsistence, low/moderate trade and individual relations. On an individual level, the distinction is even that of the exchange and value in money/commodities, as opposed to direct production. For this one can think workers (slaves, serfs, peons or otherwise) producing commodities for an owner to sell for the production of textile/cloth/fabric, versus slaves providing food, building estates, etc. In this situation, while the particular relationship may be that of slavery/serfdom, the overall social relation or universal/dominant relation in society can still be capitalistic in nature.