You can rest at castles you own for free. Your men will draw food from the castle's lands during this time.
Faction troops of varying skill levels will gradually take up residence in your castle to defend it. You can add them to your party by choosing the "Station a garrison" option, and you can also deposit men in your party in the same way. You can also drop off or pick up prisoners. Companions can also be garrisoned. Garrisoned troops draw their food from the surrounding lands.
Men left in a castle are paid only half wages as they are not on active duty, and their wages are automatically deducted (along with those of the men in your party) at the end of each week. If you place your entire party in a castle's garrison and then wait until pay day you will end up giving all your men only half the wages they earn for active service.
The "Manage this castle" menu option lets you build several improvements to enhance your castle's effectiveness. The cost and construction time will be decreased if you or your companions have points in Engineer.