The well is a building designed to support allied units and heroes by healing them over time when the units are nearby. The well can be built by Gondor, Rohan and Arnor, serving the same role in each faction. The only main difference is the appearance. While a well will passively heal, it does not passively replace fallen units.
Wells can be used in combination with cavalry to let them quickly recover in between hit and run strikes. This is especially important for Rohan's armies as they are especially cavalry-based. They can be used to support armies that are heavily defending their base, allowing them to last longer in battle. They can also be combined with a tower and a heroic statue on generic outposts to provide a forward base where attacking forces can recover. Remember that as of the 4.5.3 update, fallen units are no longer automatically replenished and need the Reinforcements ability to be activated for that.