A stable is a building in which livestock, especially horses, are kept. It most commonly means a building that is divided into separate stalls for individual animals. There are many different types of stables in use today such as the American barn which is a large barn with a door each end and individual stalls inside or free standing stables with the classic top and bottom opening doors.
Historically, the headquarters of a unit of cavalry rather than just their horses' accommodation, would be called a stable.
Used metaphorically from this origin, a stable is a collection of people (e.g. professional wrestlers) working under a single manager or animals kept by one owner.