Your question embodies large amounts of modern fantasy.
Firstly, imagine that nothing can be bought or sold by the vast and overwhelming majority of the population. Coin does not exist or circulate for most people.
There obviously would have been farmers, creating and selling produce in markets
Nope. Farmers are a modern institution related to capitalism and closed field systems. Read Wikipedia's article on the economy of England in the middle ages. Most land then was held as shares of a collective community under sufferance from a lord. Local and regional taxes ate up much of the surplus, which was in directly consumable or stored goods. There was no market. Peasants produced excess for tax, or excess as directly extracted "corvee" labour. Lords made use of rights to restrict oven building, mill building, beer brewing and the like to extract surpluses, largely in direct form.
The occasional leakage of produce to markets was not the primary form in which peasants reproduced themselves. Production specifically for market was uncommon.
but what about everyone else? How did people afford to live? I realise there was no middle-class in those days, but the average person would have still owned a home.
Unlikely. The average person was common and probably female, and so owned nothing. Ownership was usually construed around land or "real property" that was inherited amongst males who controlled large family networks. Urban law slowly developed other concepts of property, but these were limited. The average person moved between vagabondage (being a landless person), illegally settling "forests" or "deserts" (wooded or fenny potentially agricultural land), being a poor crofter or commoner with common rights but no land shares, possessing half a land share, possessing full shares, or multiple shares, enough to hire day labourers. Over generations. Over generations land might bleed out of a male dominated family, or someone might claw a right to settle legally.
The urban population was miniscule, as was the cash economy. The interaction between urban and rural economies occurred through regular taxed markets (often synchronised with circuit courts, or court days, or execution days, or religious feasts), and large festivals that were synchronised. This allowed for sufficient interaction between luxury and day to day consumption goods—all of which were rare and poor.
For example, in a 13th century city like Conwy in Wales: What would the average person have done for money who lived within the city walls? How did their version of capitalism operate?
No capitalism in the 13th century mate. Persons without a licence to practice a skill would live in starvation and penury (often being ejected from free towns or enslaved / brought into bondage). Persons with obvious free rights but no trade would merely starve. A family with a right of trade would have cemented their position generations back, and be relying on traditional trade powers to gain what was socially recognised (and enforced by priests and random social violence) the appropriate prices for their labour. A few families would have concentrated wealth, but this wouldn't be liquid capital, it would be static textiles used for display, or cloths. We know this from the viciousness with which churchmen and nobles forced "sumptuary" laws on rich town dwellers to stop them from wearing hats too big, cloaks with too many folds, or shoes that were too long.
Any wealth would have gone on luxury display to enforce the existing principles of class status and enforcement of "station," on the poor. No capital circulated as such in towns.
To put it another way, that might be easier to answer:
What would children have done with their day?
Work, play, pray and potentially starve. Formal education was a limited stream used to reproduce the clergy and a limited pool of state and church employed clerks.
What would wives have done with their day?
Work on the primary production of the household and raised children. As "industry" in the sense of useful labour was entirely handcrafts, wives worked with their husbands, husbands worked with their wives. A licence to trade was a licence for all persons in the house to conduct that trade under the mastery of the chief male.
What would husbands have done with their day?
Same as wives. Also like their wives they would have sought salvation in God's mercy. They would have sought to best display their opulence in power. To subjugate others while protecting their "ancient" (read recently invented) feudal rights.
And how would they afford to eat and live?
Largely through the production of incredibly limited luxury goods, and the circulation of these through systems of account rarely settled with coin. A large number of them would be entirely dependent upon charity, or becoming the bonded member of a powerful household and serving.
And of course the alternative is starving to death, or having near total child mortality and early adult mortality due to disease such that your family dies rather than producing more persons.
You're importing a fantasy you possess onto pre-modern economies. The way forward is by reading the rigorous economic histories, such as the ones cited in Economy of England in the middle ages on wikipedia.