"Who hates who, who gets along with who, who is buddy-buddy with who and so on."
I mean, as a whole (a racial scale), I think everyone hates everyone for one reason of another (genocide, war, etc etc)
As far as stereotypical racism there's pretty much just stock racism in the elder scrolls, nothing too innovative, for example:
All khajiits are theives, all Nords are stupid, all Elves are assholes, etc etc.
To be honest most races are at least mildly racist towards all the others. Anyways off the top of my head Argonians have a shared hatred with the Khajit and Dunmer. Altmer have a superiority complex around the fact they believe they were the first true culture on Tamriel and as such are the most cultured. Bosmer are on okay terms with them and Khajit seem to have a high opinion on them because they brought back the moons or at least claim they did. Nords tend to not like any of the elf or beast races with Bosmer being a minor exception. Also since the empire was in Cyrodiil and they're in the center of Tamriel Imperials seem to be the best rounded with their relations.
Anyways I'm still new to the series so this is at least what I've found by reading around and some in game suggestions so feel free to correct me on any of these.
"How can they even have an agreement to get along with each other if that's their history with each other?"
I'm not brushed up on my lore or dates and stuff but I think the alliances in ESO are 1st or 2nd era alliances. The dunmer invasion of black marsh was I think a 3rd era event. So during the invasion, the ebonheart pact was the history, not vice versa
I personally hadn't heard of any of the alliances pre ESO so I think they were made with gameplay in mind 1st, and how it fits in with the lore 2nd. You know, like, those alliances are long gone and a lot has changed since then. And I think the alliances were grouped with geographic efficiency being the goal.
Of course I could be wrong about literally everything I said. I suppose this would be a question better posed to the locals who know more about the lore than I