Title Case Rules
Title case does not capitalize every word. Usually the first and last words, nouns, verbs, adjectives and adverbs are capitalized; articles, short prepositions and conjunctions stay lowercase in the middle. APA, Chicago and AP differ in details.
Common rules
Capitalize the first and last word even if it is a small word.
Keep small words (a, an, the, of, to, and, or, for, in, on) lowercase in the middle.
Usually capitalize the first word after a colon.
Style differences
APA tends to capitalize prepositions and conjunctions of four or more letters; Chicago has a more detailed word list.
Do not title-case code, URLs or file names; kebab-case or snake_case fits better.
FAQ
Should 'and' be capitalized?
Usually lowercase in the middle; capitalize it when first or last.
What about proper nouns?
Proper nouns stay capitalized regardless of small-word rules.