A dilemma is a situation with two or more options on offer, all of them difficult or unwelcome, while a quandary is more general: simply being unsure what to do, whether or not the choices themselves are painful. If both paths forward look bad, you are in a dilemma; if you just cannot decide, you are in a quandary.
The core difference
A dilemma specifically involves a choice between unwelcome options; a quandary is any state of not knowing what to do.
- dilemma — a situation requiring a choice between two or more options, all of which are difficult or unwelcome: she faced a dilemma: keep the secret or betray her friend's trust.
- quandary — a state of being unsure what to do, especially when facing a difficult choice: she was in a quandary about whether to accept the job offer.
How to tell them apart
Dilemma comes from Greek roots meaning double proposition, and that sense of exactly two hard options still shapes how the word is used, even though it is now also applied loosely to any tough choice with several unappealing paths. Quandary carries no such structure: it just describes the state of uncertainty itself, and the difficulty facing it need not come from every option being bad, only from not being sure which to pick.
A useful test is whether you can name the specific unwelcome options. If you can list them, as in keep the secret or betray the friend, dilemma fits well. If you are simply stuck and unsure, without options that are each clearly bad, quandary is the more accurate word.