Compound noun

A compound noun is a noun phrase made up of two nouns, e.g. bus driver, in which the first noun acts as a sort of adjective, a classifying adjective, for the second one, but without "really" describing it, for instance, the difference between, for instance, a black bird and a blackbird.

It can be made up of two or more other words, but with a single meaning. Compounds may, or may not, be hyphentated and they may be written separated, especially if one of the words has more than one syllable, as in living room, or if compounding creates a weird-looking word - so we write car keys, not. In that regard, it's necessary to avoid the over-simplification of saying that two single-syllable words are written together as one word. Thus, tablecloth but table mat, wine glass but wineglassful or key ring but keyholder. Moreover, there are cases which some people/dictionaries will write one way while others write them another way.

When two short words are written together, they always have the word stress on the first syllable, like many two-syllable nouns: A common exception is weekend, which can be stressed in two ways: /wiːkˈɛnd, ˈwiː-/. Curiously, until very recently we wrote (the) week's end, which later became week-end and then our beloved weekend.

There are three typical structures.

Noun + noun

 * the car keys; a bottle opener; a language teacher;

The two nouns can be written separately (taxi driver), separated by a hyphen (story-teller), or as one word (classroom).

This structure is often used in newspaper headlines.

Noun + preposition + noun

 * court of law; dictionary of quotations; hole-in-one; state of mind;

Noun + 's + noun

 * Spain's economy; a hornet's nest;

Some typical examples
Note: although they may have other functions, the following are all nouns (see last point above).

Always written together
Some items are always written as one word.

Two (originally) monosyllable words

 * backache; bathroom; blackboard; boardwork; classroom; coursebook; earring; footprint; greenhouse; guidebook; guideline; handbook; handgun; headache; homework; keyboard; laptop; lighthouse; notebook; podcast; seafood; seafront; shellfish; shopfront; smokescreen; spoonful; spotlight; stopwatch; striptease; sunlight; sunset; sunshine; suntan; timeline; timetable; toothache; toothbrush;

Others

 * basketball; bellyache; bellyflop; cardholder; fingerprint; heavyweight; holidaymaker; homeowner; householder; hovercraft; leftovers; notepaper; paperweight; paperwork; pillowcase; proofreader; riverbed; spellchecker; sunglasses; takeaway; thunderstorm; timekeeper; undergraduate; underground; underperformance; underwear; wallpaper; waterfall; watermark; weedkiller;

Always written separately
Some items are always written separately:

Monosyllable words

 * bus lane; bus stop; fast food; front door; hot dog;

Others

 * box office; petrol station; shop window; stomach ache; swimming pool; text message;

Scientific terms

 * bed bug - house fly (but not butterfly )

Written with a hyphen

 * catch-all; double-decker; drink-driving; feather-brain; hole-in-one; press-up; rip-off; see-saw; semi-automatic; sit-up; spin-off; take-off; tap-dancing;

Written in different ways

 * eye-witness = eyewitness; mouse pad = mousepad; videoconference = video conference;

Headless compounds
Headless compounds are nouns that typically refer to people. They are written as one word or, occasionally, with a hyphen. There are two main types:
 * verb + noun: cut-throat - pickpocket - scarecrow;
 * adjective + noun: butterfingers - fathead - heavyweight - redneck;

Plurals
Traditionally, certain compound nouns are pluralised by giving the headword the plural form, rather than the the whole thing. However, the traditional mothers-in-law can now also be seen, and heard, as mother-in-laws.
 * attorneys general
 * commanders-in-chief
 * passers-by
 * poets laureate