In the campaign, you are stuck with them. It's designed that way.
For sandbox games, on the last page of game set up you get to choose opponents. Under the box showing which opponents are currently in the game, there is a window showing information on the currently selected AI race. For each race you can choose starting relations, make sure this is set to anything but "team". This setting is about 1/3 of the way up from the bottom of the screen and roughly centered (going from memory).
If this isn't enough, hopefully someone will post a screenshot.