If the trainer is employed by the barn owner, then the trainer might receive free or reduced rent for on-site living if there is an apartment available. Free or reduced rate board for a horse or two might also be included in the employment package. Obviously providing those things might decrease salary. There are tax benefits for both parties to providing on site living arrangements to employees.
If the trainer is not an employee, but instead is running their own business arrangements would typically be pretty different. The trainer would most likely pay fair market rent for an on site apartment, and also would typically pay board (or rent stalls) for any personal horses. The trainer could either pay rent for dry stalls and provide all of the care and management for the horses, OR the BO could provide and bill for board and the trainer could charge for training separately.
In some cases a BO might be willing to reduce board or give free board for one or two of a trainer’s horses if they felt that having that trainer there brought in a significant enough amount of profitable business. More frequently I have seen barter situations, where the trainer receives reduced or free board for a certain number of horses in exchange for training services for the BO’s horses.
Because boarding is typically a loss leader for other services, the decision of how to handle an on site non-employee trainer depends upon the finances of the particular situation. In general, the trainer benefits because they have the benefit of not needing to lay out the enormous capital investment (and risk) of purchasing, insuring and maintaining a facility.