Sometimes teams from the same city who even share the same venue will play each other. The perfect example of that is the Los Angeles Clippers and the Los Angeles Lakers, two NBA teams who play in the same arena, called the Staples Center.
In that case, although technically the arena is the home of both teams, one team will still be the home team and the other will still be the away team; if the Lakers are home, the court played on will have the Lakers logo and the Clippers will be treated and presented like any other NBA team that comes play the Lakers at home. The same will happen with the Lakers when the Clippers are the home team.
Sometimes it is also the case that there won't be any home or away teams, as the game is played on a neutral ground. The perfect example of that is the Super Bowl, the game that decides the NFL champion. The venue is decided years in advance, and most of the time none of the teams making it to the big game are the ones that call the chosen stadium home.
Having uniforms that are distinguishable from each other is a crucial part of team sports, as it makes it easier for players, fans, coaches, and anyone else involved with the game to identify the teams and its players. Historically, the home team was always the one wearing white or light-colored uniform, while the away team was the one wearing colored, or dark uniforms. Although that was part of the rule book in some sports, it now varies from league to league which colors are used by the home and away teams. On the major american sport leagues, it goes as it follows:
Nonetheless that trend is still sometimes broken, especially in the NBA where teams have special edition shirts, which are not always white or light colored. In soccer many teams have whitie as one of their secondary colors, and so make their secondary kits white. In that case, most times when playing at home the team will wear colored uniforms at home. But the opposite is also possible, and teams many times have their primary jerseys being white. As seen, there is truly no universal sports rule that says that home teams should wear white uniforms.