Hi Hannah!
The two terms are generally used interchangeably, but if we want to get specific, 词典 means "word dictionary" and 字典 means "character dictionary." Based on my experience (and another native speaker can correct me if I'm wrong), 词典 is usually used for dictionaries in languages where individual words are defined (e.g. English), and 字典 is used for Chinese character dictionaries. If it's a bilingual dictionary (e.g. Chinese to English), 词典 is used more often.
Again, I could be wrong, since I'm answering only based on the dictionary titles I've seen.