The books mainly portray the Gryffindor point of view, but additional information about the relationships between the Hogwarts houses can be extrapolated from Pottermore's "welcome messages" written by J. K. Rowling [1].
Gryffindor - Slytherin
Open hostility from both sides:
Now, a lot of people say that Slytherins and Gryffindors represent two sides of the same coin. Personally, I think Gryffindors are nothing more than wannabe Slytherins. Mind you, some people say that Salazar Slytherin and Godric Gryffindor prized the same kinds of students, so perhaps we are more similar than we like to think. But that doesn’t mean that we cosy up with Gryffindors. They like beating us only slightly less than we like beating them.
Slytherin House welcome message
Gryffindor - Ravenclaw
Generally on good terms, though Gryffindors consider some Ravenclaws weirdos, and Ravenclaws sometimes accuse Gryffindors of showing off:
But he had hoped the Ravenclaws might have found it in their hearts to support him as much as Cedric. He was wrong, however. Most Ravenclaws seemed to think that he had been desperate to earn himself a bit more fame by tricking the Goblet into accepting his name.
Harry Potter and the Goblet of Fire, Chapter 18 The Weighing of the Wands
The Gryffindors are OK. If I had a criticism, I’d say Gryffindors tend to
be show-offs. They’re also much less tolerant than we are of people who are
different; in fact, they’ve been known to make jokes about Ravenclaws.
Ravenclaw House welcome message
Gryffindor - Hufflepuff
Very good relationship, even if Hufflepuffs are sometimes seen as "too ordinary":
The Hufflepuffs, who were usually on excellent terms with the Gryffindors, had turned remarkably cold towards the whole lot of them. [...] It was plain that the Hufflepuffs felt that Harry had stolen their champion's glory; a feeling exacerbated, perhaps, by the fact that Hufflepuff house very rarely got any glory, and that Cedric was one of the few who had ever given them any, having beaten Gryffindor once at Quidditch.
Harry Potter and the Goblet of Fire, Chapter 18 The Weighing of the Wands
Gryffindor (the house we get on best with)
Hufflepuff House welcome message
Slytherin - Ravenclaw
Slytherins are generally distrusted by Ravenclaws, who are in turn accused of being excessively competitive and bookish:
Well, you’ve probably
heard about the Slytherins. They’re not all bad, but you’d do well to be
on your guard until you know them well. They’ve got a long house tradition
of doing whatever it takes to win – so watch out, especially in Quidditch
matches and exams.
Ravenclaw House welcome message
We Slytherins look after our own – which is more than you can say for Ravenclaw. Apart from being the biggest bunch of swots you ever met, Ravenclaws are famous for clambering over each other to get good marks, whereas we Slytherins are brothers.
Slytherin House welcome message
Slytherin - Hufflepuff
Slytherins are extremely dismissive of the Hufflepuffs' lack of ambition; the Hufflepuffs share the other houses' negative opinion about the Slytherins:
Merlin was a Slytherin. Yes, Merlin himself, the most famous wizard in history! He learned all he knew in this very house! Do you want to follow in the footsteps of Merlin? Or would you rather sit at the old desk of that illustrious ex-Hufflepuff, Eglantine Puffett, inventor of the Self-Soaping Dishcloth?
Slytherin House welcome message
Of course, you’d expect Slytherin to churn out evil-doers, seeing as they’ve never heard of fair play and prefer cheating over hard work any day
Hufflepuff House welcome message
Ravenclaw - Hufflepuff
Ravenclaws openly appreciate the Hufflepuffs' niceness, but sometimes fail to appropriately recognize their achievements.
As for the Hufflepuffs, well, nobody could say they’re not nice people. In
fact, they’re some of the nicest people in the school. Let’s just say you
needn’t worry too much about them when it comes to competition at exam time.
Ravenclaw House welcome message
So, as you can see, we’ve produced more than our fair share of powerful, brilliant and daring witches and wizards, but, just because we don’t shout about it, we don’t get the credit we deserve. Ravenclaws, in particular, assume that any outstanding achiever must have come from their house.
Hufflepuff House welcome message
[1] Upon being sorted in a house, Pottermore users are shown a writing by J. K. Rowling in the form of a welcome message from the house prefect.
While, unfortunately, there are no official public links for the distinct messages, all four of them can be found from unofficial sources, for example in the Pottermore Wikia: Gryffindor, Slytherin, Ravenclaw, Hufflepuff.