"Dictionary" and "vocabulary" — when to use either?
They are two different things.
The dictionary is a book (or series of books) that lists all words in alphabetical order with pronunciation, definitions, classifications (noun, verb, adjective) and if it's bilingual (E.G. English-[other language]) it gives the translation.
The vocabulary is not an object, it's that collection of words used in a given language. It can also indicate the amount of words known by a certain person (E.G. John has such a wide vocabulary!).
EDIT: I wrote that lexicon is a synonym of vocabulary, and it is, but Rhodri made me notice that it's also a synonym of dictionary. So I investigated a bit and, as I was suspecting, it has a restricted use, which is still right though... From the OED:
A word-book or dictionary; chiefly applied to a dictionary of Greek, Hebrew, Syriac, or Arabic. The restricted use is due to the fact that until recently dictionaries of these particular languages were usually in Latin, and in mod.L. lexicon, not dictionarius, has been the word generally used.
'Dictionary' refers directly to a book compiling words and their meanings. Examples are The Oxford English Dictionary, Merriam-Webster and Collins English Dictionary.
'Vocabulary' refers to the list of words within a particular language or that an individual has in their command.
Hope that helps.
A dictionary is a book with the definitions of words in it. Vocabulary is an intangible concept referring to a set of words. It could be a person's vocabulary meaning all the words they know, the vocabulary of a profession, or the words relevant to a lesson in a textbook