[1] Given sufficient compatibility between facility requirements, two teams that do not play the same sport may share a ground or a stadium.
North American indoor arenas commonly feature basketball and ice hockey teams sharing the facility during their common fall-to-spring season; a layer of insulation and a basketball floor can easily be laid over or removed from the hockey rink, and dasher boards disassembled or reconfigured, in a matter of hours.
[1] This practice fell out of fashion in the 1990s as baseball teams entered the retro-classic ballpark age, where stadiums became more classically styled to the sport, and were intentionally sized to disallow a football layout entirely unless they have a deep outfield, along with seating arrangements which would disadvantage the views football spectators.
The development of Major League Soccer and the United States soccer league system then allowed for the development of soccer-specific stadiums which could also host college football and high school football without the overhead and 'empty bowl' feel of the 50,000+ seats required to host an NFL game.
As the space requirements for a regulation NHL hockey rink can easily contain a regulation NBA basketball court comfortably with additional courtside seating, in many cases where a metropolitan area has both an NBA and an NHL franchise, the teams will share the same arena.