Your horses need a place to live! You can build more stalls on the Facilities page, and lease spare stalls for extra money.
You pay agistment fees each week to house and feed your stable of horses, and pay one-off expenses to make room for more horses (or to remove a stall). Your stable can physically hold up to 30 stalls. Increasing or reducing the capacity of your stables enables you to house and feed more/less horses successfully. It is possible to crowd more horses into your stable than there are stalls, however this is almost certainly going to lead to a massive loss of your horses condition. After all, if you want a high-performance horse you'll need to provide for it in a professional manner!
The costs to maintain the stall and to increase/reduce capacity is determined by your stables racing class - the higher your class, the higher the cost to resize and maintain these facilities. Top class horses need top class care! No matter which class you are in, the first 4 stables will be provided free by the sponsors of your stable, with no ongoing cost to your Stable finances each week.
Some of the unused stalls in the stable (as determined at Financial updates on Sunday evening) will be leased to the public, earning you income. The amount of stalls you can lease to the public is determined by your stable's prestige level and the number of administrative assistants on your staff at the time. The better your prestige, the more demand there will be to agist with you. The more administrative assistants you have the better your staff will be able to cope with collecting payments for these services. (See Administrative staff)