Hear, hear (usually with a comma and set apart as a self-contained sentence) is the conventional spelling of the colloquial exclamation used to express approval for a speaker or sentiment. It’s essentially short for hear him, hear him or hear this, hear this, where these phrases are a sort of cheer.
Here, here is widely regarded as a misspelling, although it is a common one, and there are ways to logically justify its use. But for what it’s worth, hear, hear is the original form (the Oxford English Dictionary cites examples going back to the 17th century) and is the one listed in dictionaries. English reference books mention here, here only to note that it’s wrong.
In writing, hear, hear usually appears after a quote expressing an opinion with which the author agrees—for example:
Rep. Brian Bilbray and a whole bunch of others have championed the cutting-off of employment opportunities to dull Uncle Sam’s luster for those who have no respect for our laws. Hear, hear. [North County Times (link now dead)]
“Only that it was awesome,” she said, “and that the Bronco Bowl was the only concert venue that ever mattered.” Hear, hear. [Dallas Observer]
“I think we need to go back to old-fashioned basics and hard work in the nets and not try and re-invent the wheel.” Hear, hear! [Daily Telegraph]