To hyphenate or not?
What is the proper way to spell "side dish"? Is it: "side dish" or "side-dish"?
Also, Is it "ham-fried" or "ham fried"?
Basically, when do you use hyphens?
There's no single answer to this: various conventions exist depending on personal preference and/or the in-house (or "in house", or "inhouse") style guide for the particular publication you're writing for. That said, I think that in general, using hyphens between the elements of compound nouns is less common nowadays (so people would tend to write "side dish", "ticket office" etc, not "side-dish", "ticket-office"). I also get the impression (with no hard statistics to back it up) that US usage favours the hyphen still a bit more than UK usage.
I think a common modern convention is to use hyphens mainly for cases of ambiguity or where a compound functions as an adjective (or perhaps more specifically, compounds "in attributive position"[*]). The hyphen is maybe a bit more common with compound verbs as well.
[*] Bauer, L. (2006), "Compounds and Minor Word-formation Types" in The Handbook of English Linguistics, Blackwell, pp. 483-506.
From the same author:
You may want to consult The Economist's style guide entry on the subject, it provides useful guidelines.