One would think that just killing all hostile enemies in that area would work, but such is not always the case. I have a few locations in my game where I am pretty damn positive is already "cleared" - I went through the same dungeon like 2 to 3 times to check that all enemies are dead; but the game doesn't label the dungeon as "cleared".
And just for another example, the early Imperial Legion quest that Rikke gives you as a "test" to see whether you're worthy of joining the Legion or not. She sends you off to this small-sized fort so it's hard to miss any enemies. They even give you quest markers on the enemies so you know exactly if there are any enemies left. Yet after clearing all of the enemies at that fort (there are 2 interiors; the actual fort and the prison - again, very small sized, hard to miss anything), and upon completion of the quest, the game doesn't label the fort as "cleared".
Also did a quest near Morthal where I was tasked to kill a vampire lord in his lair... after killing all of the enemies in that lair and completing the quest, the lair isn't labelled as "cleared". I went in 3 times to check - no unkilled enemies.

Any ideas?