The most effective why to learn vocabulary seems to be learning it in context – i.e. by reading and listening to lots of material in the language you’re learning and by doing your best to learn the new words you encounter, and also by trying to work out the meaning of unfamiliar words from the context. Maybe the first time you read or hear particular words they will mean nothing to you, but if you hear them again several times in different contexts you might be able to guess their meaning. If you can guess the meanings of words you’re likely to remember them better than if you use a dictionary.
One useful exercise is to take a particular text or recording and to study it in detail. You could make sure that you know the meaning of all the words, that you understand the grammar and word order, and that you can pronounce everything. With recordings it might help to make a transcription, and with written texts it might help to have a native speaker record it for you, if possible, or to at least read them aloud to check your pronunciation.
Once you have a in-depth understand of the material, you could take individual words from it and find related ones – synonyms (words with a similar meaning), homonyms (words with a similar sound but a different meaning), antonyms (words with the opposite meaning, e.g. up / down, in / out, etc), and words with related meanings (e.g. car, bus, train, etc). This will help build your vocabulary in a fairly systematic way, and is something you can dip into when the urge takes you rather than trying to do it all at once.