He loved both of his sons - he just didn't feel as proud of Faramir as he did of Boromir.
Boromir,
was especially loved by Denethor, though both of them were so 'unlike in mind'. Why? Boromir was older and had the right of primogeniture. He was the heir of Denethor: eventually Boromir was going to succeed his father as Steward at Denethor's death (didn't happen of course). Here is proof that Denethor loved Boromir:
'So time drew on to the War of the Ring, and the sons of Denethor grew to manhood. Boromir, five years the elder, beloved by his father, was like him in face and pride, but in little else. [...].'
Denethor loved Boromir much more than Faramir because Boromir was more loyal to him.
'Do you wish then, said Faramir, 'that our places had been exchanged?'
'Yes, I wish that indeed,' said Denethor. 'For Boromir was loyal to me and no wizard's pupil.'
Faramir,
on the other hand, doesn't receive as much love from Denethor as Boromir.
Faramir, seeking knowledge, looked up to Gandalf when the latter visited the city. Denethor, of course, did not approve of this, as he had learnt much about Gandalf's hidden intentions of supplanting him through the use of the Palantir and his keen perception.
'Ill?' cried Denethor, and his eyes flashed suddenly. 'Why do you ask? The men were under your command. Or do you ask for my judgement on all your deeds? Your bearing is lowly in my presence, yet it is long now since you turned from your own way at my counsel. See, you have spoken skilfully, as ever; but I, have I not seen your eye fixed on Mithrandir, seeking whether you said well or too much? He has long had your heart in his keeping.
[...]
'Would that have availed to change your judgement?' said Denethor. 'You would still have done just so, I deem. I know you well. Ever your desire is to appear lordly and generous as a king of old, gracious, gentle.
Even so, Faramir was still loved by his father. This love was further reinforced upon the death of Boromir, actually, since Faramir would've been the Heir of Denethor and Denethor's last remaining son. Denethor grieved as Faramir lay in his fever.
During all this black day Faramir lay upon his bed in the chamber of the White Tower, wandering in a desperate fever; dying someone said, and soon 'dying' all men were saying upon the walls and in the streets. And by him his father sat, and said nothing, but watched, and gave no longer any heed to the defence.
And as he watched, it seemed to him that Denethor grew old before his eyes, as if something had snapped in his proud will, and his stern mind was overthrown. Grief maybe had wrought it, and remorse. He saw tears on that once tearless face, more unbearable than wrath.
He was crying!
'Do not weep, lord,' he stammered. 'Perhaps he will get well. Have you asked Gandalf?'
'Comfort me not with wizards!' said Denethor. 'The fool's hope has failed. The Enemy has found it, and now his power waxes; he sees our very thoughts, and all we do is ruinous.
Proud though he is, he doesn't even deny that he's crying. That's definitely concrete proof that he loved Faramir.
Did Faramir hate Denethor?
I dare say the answer is no. This is never implied directly in the books, but I have found relevant material that suggests Faramir's love for his father:
Wood was piled under it, and high all about it, and all was drenched with oil, even the garments of Faramir and the coverlets; but as yet no fire had been set to the fuel. Then Gandalf revealed the strength that lay hid in him; even as the light of his power was hidden under his grey mantle. He leaped up on to the faggots, and raising the sick man lightly he sprang down again, and bore him towards the door. But as he did so Faramir moaned and called on his father in his dream.
Denethor started as one waking from a trance, and the flame died in his eyes, and he wept; and he said: 'Do not take my son from me! He calls for me.'
Does Denethor want the ring more than his sons?
We don't know. Denethor was never presented outright with the One Ring, so we will never know whether he will 'pass the test' - just as Faramir did. Though, he was given a choice:
'What then is your wisdom?' said Gandalf.
'Enough to perceive that there are two follies to avoid. To use this thing is perilous. At this hour, to send it in the hands of a witless halfling into the land of the Enemy himself, as you have done, and this son of mine, that is madness.'
'And the Lord Denethor what would he have done?'
'Neither. But most surely not for any argument would he have set this thing at a hazard beyond all but a fool's hope, risking our utter ruin, if the Enemy should recover what he lost. Nay, it should have been kept, hidden, hidden dark and deep. Not used, I say, unless at the uttermost end of need, but set beyond his grasp, save by a victory so final that what then befell would not trouble us, being dead.'
Of course, we will never know what Denethor would have really done, as he did not feel the direct temptation of the Ring before, unlike Boromir and Faramir, who both failed and passed the 'test* respectively.
Film-wise...
Boromir is shown to have argued with Denethor over Faramir's competence. He was not arrogant against Faramir, though it may have seemed so. Boromir's 'argument' with Denethor is seen in: Scene 41 ~ Sons of the Steward
BOROMIR: (seeing Denethor talking to the soldiers behind them) One moment of peace, can he not give us that?
DENETHOR: Where is he? Where is Gondor's finest? Where's my first-born?
BOROMIR: (looks jaded and turns to face his father) Father!
DENETHOR: They say you vanquished the enemy almost single-handedly.
BOROMIR: They exaggerate. The victory belongs to Faramir also.
He looks towards Faramir who walks towards them
DENETHOR: But for Faramir, this city would still be standing.
Faramir looks uneasy
DENETHOR: Were you not entrusted to protect it?
FARAMIR: I would have done, but our numbers were too few.
DENETHOR: Oh, too few. You let the enemy walk in and take it on a whim. Always you cast a poor reflection on me. (he walks up to Faramir. Boromir drops his head)
FARAMIR: That is not my intent.
Boromir walks away and Denethor follows him.
BOROMIR: You give him no credit, and yet he tries to do your will. He loves you, Father.
DENETHOR: Do not trouble me with Faramir...I know his uses, and they are few. We have more urgent things to speak of. Elrond of Rivendell has called a meeting. He will not say why, but I have guessed its purpose. It is rumored that the weapon of the enemy has been found.
In the films, Boromir is seen to love his brother dearly and argues for his sake.
[...]
FARAMIR: lf there is need to go to Rivendell...send me in his stead.
DENETHOR: You? Oh, I see. A chance for Faramir, captain of Gondor, to show his quality. I think not. (Faramir lowers his eyes, deeply hurt) I trust this mission only to your brother. The one who will not fail me.
Boromir is on his horse. He looks up at the Gondor banner and then at his brother
BOROMIR: Remember today, little brother.
He rides out of Osgiliath